1 # MediaWiki Parser test cases
2 # Some taken from http://meta.wikimedia.org/wiki/Parser_testing
3 # All (C) their respective authors and released under the GPL
5 # The syntax should be fairly self-explanatory.
7 # Currently supported test options:
8 # One of the following three:
10 # (default) generate HTML output
11 # pst apply pre-save transform
12 # msg apply message transform
14 # Plus any combination of these:
16 # cat add category links
17 # ill add inter-language links
18 # subpage enable subpages (disabled by default)
19 # noxml don't check for XML well formdness
20 # title=[[XXX]] run test using article title XXX
21 # language=XXX set content language to XXX for this test
22 # variant=XXX set the variant of language for this test (eg zh-tw)
23 # disabled do not run test
24 # parsoid parsoid-only test (not run by PHP parser)
25 # php php-only test (not run by the parsoid parser)
26 # showtitle make the first line the title
27 # comment run through Linker::formatComment() instead of main parser
28 # local format section links in edit comment text as local links
30 # For testing purposes, temporary articles can created:
31 # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle
32 # where '/' denotes a newline.
34 # This is the standard article assumed to exist.
59 MediaWiki:bad image list
61 * [[File:Bad.jpg]] except [[Nasty page]]
95 Template:echo_with_span
101 Template:echo_with_div
113 Template:table_attribs
116 |</noinclude>style="color: red"| Foo
138 This is a simple paragraph.
140 <p>This is a simple paragraph.
145 Paragraphs with extra newline spacing
168 Paragraphs with newline spacing with comment lines in between
176 <!--foo--><!--More than 1 comment disables stripping of this line!-->
233 Paragraphs with newline spacing with non-empty white-space lines in between
260 Paragraphs with newline spacing with non-empty mixed comment and white-space lines in between
268 <!--foo--><!--More than 1 comment disables stripping of this line!-->
309 http://fr.wikipedia.org/wiki/🍺
310 <!-- EasterEgg we love beer, better be able be able to link to it -->
312 <p><a rel="nofollow" class="external free" href="http://fr.wikipedia.org/wiki/🍺">http://fr.wikipedia.org/wiki/🍺</a>
332 * plain''italic''plain
333 * plain''italic''plain''italic''plain
334 * plain'''bold'''plain
335 * plain'''bold'''plain'''bold'''plain
336 * plain''italic''plain'''bold'''plain
337 * plain'''bold'''plain''italic''plain
338 * plain''italic'''bold-italic'''italic''plain
339 * plain'''bold''bold-italic''bold'''plain
340 * plain'''''bold-italic'''italic''plain
341 * plain'''''bold-italic''bold'''plain
342 * plain''italic'''bold-italic'''''plain
343 * plain'''bold''bold-italic'''''plain
344 * plain l'''italic''plain
345 * plain l''''bold''' plain
348 </li><li> plain<i>italic</i>plain
349 </li><li> plain<i>italic</i>plain<i>italic</i>plain
350 </li><li> plain<b>bold</b>plain
351 </li><li> plain<b>bold</b>plain<b>bold</b>plain
352 </li><li> plain<i>italic</i>plain<b>bold</b>plain
353 </li><li> plain<b>bold</b>plain<i>italic</i>plain
354 </li><li> plain<i>italic<b>bold-italic</b>italic</i>plain
355 </li><li> plain<b>bold<i>bold-italic</i>bold</b>plain
356 </li><li> plain<i><b>bold-italic</b>italic</i>plain
357 </li><li> plain<b><i>bold-italic</i>bold</b>plain
358 </li><li> plain<i>italic<b>bold-italic</b></i>plain
359 </li><li> plain<b>bold<i>bold-italic</i></b>plain
360 </li><li> plain l'<i>italic</i>plain
361 </li><li> plain l'<b>bold</b> plain
366 # this example taken from the simple/Moon article
368 Italics and possessives
370 obtained by ''[[Lunar Prospector]]'''s gamma-ray spectrometer
372 <p>obtained by <i><a href="/index.php?title=Lunar_Prospector&action=edit&redlink=1" class="new" title="Lunar Prospector (page does not exist)">Lunar Prospector</a>'</i>s gamma-ray spectrometer
377 ### 2-quote opening sequence tests
380 Italics and bold: 2-quote opening sequence: (2,2)
390 Italics and bold: 2-quote opening sequence: (2,3)
400 Italics and bold: 2-quote opening sequence: (2,4)
410 Italics and bold: 2-quote opening sequence: (2,5) (php)
419 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
421 Italics and bold: 2-quote opening sequence: (2,5) (parsoid)
433 ### 3-quote opening sequence tests
437 Italics and bold: 3-quote opening sequence: (3,2)
447 Italics and bold: 3-quote opening sequence: (3,3)
457 Italics and bold: 3-quote opening sequence: (3,4)
467 Italics and bold: 3-quote opening sequence: (3,5) (php)
476 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
478 Italics and bold: 3-quote opening sequence: (3,5) (parsoid)
490 ### 4-quote opening sequence tests
494 Italics and bold: 4-quote opening sequence: (4,2)
504 Italics and bold: 4-quote opening sequence: (4,3)
514 Italics and bold: 4-quote opening sequence: (4,4)
524 Italics and bold: 4-quote opening sequence: (4,5) (php)
533 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
535 Italics and bold: 4-quote opening sequence: (4,5) (parsoid)
541 <p>'<b>foo<i></i></b>
547 ### 5-quote opening sequence tests
551 Italics and bold: 5-quote opening sequence: (5,2) (php)
560 # Parsoid reverses the nesting order, compared to the PHP parser
562 Italics and bold: 5-quote opening sequence: (5,2) (parsoid)
574 Italics and bold: 5-quote opening sequence: (5,3)
584 Italics and bold: 5-quote opening sequence: (5,4)
588 <p><i><b>foo'</b></i>
594 Italics and bold: 5-quote opening sequence: (5,5)
603 ### multiple quote sequences in a line
606 Italics and bold: multiple quote sequences: (2,4,2)
610 <p><i>foo'<b>bar</b></i>
616 Italics and bold: multiple quote sequences: (2,4,3)
620 <p><i>foo'<b>bar</b></i>
626 Italics and bold: multiple quote sequences: (2,4,4)
630 <p><i>foo'<b>bar'</b></i>
636 Italics and bold: multiple quote sequences: (3,4,2) (php)
645 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
647 Italics and bold: multiple quote sequences: (3,4,2) (parsoid)
653 <p><b>foo'</b>bar<i></i>
659 Italics and bold: multiple quote sequences: (3,4,3) (php)
668 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
670 Italics and bold: multiple quote sequences: (3,4,3) (parsoid)
676 <p><b>foo'</b>bar<b></b>
681 ### other quote tests
684 Italics and bold: other quote tests: (2,3,5)
686 ''this is about '''foo's family'''''
688 <p><i>this is about <b>foo's family</b></i>
694 Italics and bold: other quote tests: (2,(3,3),2)
696 ''this is about '''foo's''' family''
698 <p><i>this is about <b>foo's</b> family</i>
704 Italics and bold: other quote tests: (3,2,3,2)
706 '''this is about ''foo'''s family''
708 <p><b>this is about <i>foo</i></b><i>s family</i>
713 # The Parsoid team believes the PHP parser's output on this test is wrong.
714 # It only checks for convert-to-bold-on-single-character-word when the word
715 # matches with a bold tag ("'''") that is *odd* in the list of quote tokens.
716 # This means that the bold token in position 2 (0-indexed) gets converted by
717 # parsoid, but doesn't get changed by the PHP parser.
719 Italics and bold: other quote tests: (3,2,3,3) (php)
723 '''this is about ''foo'''s family'''
725 <p>'<i>this is about </i>foo<b>s family</b>
728 # This is the output the Parsoid team believes to be correct.
730 Italics and bold: other quote tests: (3,2,3,3) (parsoid)
734 '''this is about ''foo'''s family'''
736 <p><b>this is about <i>foo'</i>s family</b>
742 Italics and bold: other quote tests: (3,(2,2),3)
744 '''this is about ''foo's'' family'''
746 <p><b>this is about <i>foo's</i> family</b>
752 Italicized possessive
754 The ''[[Main Page]]'''s talk page.
756 <p>The <i><a href="/wiki/Main_Page" title="Main Page">Main Page</a>'</i>s talk page.
765 Non-html5 tags should be accepted
767 <center>''foo''</center>
770 <strike>''foo''</strike>
773 <center><i>foo</i></center>
774 <p><big><i>foo</i></big>
775 <font><i>foo</i></font>
776 <strike><i>foo</i></strike>
782 ### <nowiki> test cases
786 <nowiki> unordered list
788 <nowiki>* This is not an unordered list item.</nowiki>
790 <p>* This is not an unordered list item.
797 <nowiki>Lorem ipsum dolor
818 :There is not nowiki.
819 :There is <nowiki>nowiki</nowiki>.
821 #There is not nowiki.
822 #There is <nowiki>nowiki</nowiki>.
824 *There is not nowiki.
825 *There is <nowiki>nowiki</nowiki>.
827 <dl><dd>There is not nowiki.
828 </dd><dd>There is nowiki.
830 <ol><li>There is not nowiki.
831 </li><li>There is nowiki.
833 <ul><li>There is not nowiki.
834 </li><li>There is nowiki.
840 Entities inside <nowiki>
842 <nowiki><</nowiki>
853 Comments and Indent-Pre
855 <!-- comment 1 --> asdf
857 <!-- comment 1 --> asdf
860 <!-- comment 1 --> asdf
861 <!-- comment 2 -->xyz
863 <!-- comment 1 --> asdf
864 <!-- comment 2 --> xyz
920 asdf<!-- comment 1 -->jkl
930 <!-- foo --> b <!-- bar -->
944 <!-- returns a single newline, not nothing, since the newline after > is not stripped -->
950 Comment semantics and delimiters
952 <!-- --><!----><!-----><!------>
958 Comment semantics and delimiters, redux
960 <!-- In SGML every "foo" here would actually show up in the text -- foo -- bar
961 -- foo -- funky huh? ... -->
967 Comment semantics and delimiters: directors cut
969 <!-- ... However we like to keep things simple and somewhat XML-ish so we eat
970 everything starting with < followed by !-- until the first -- and > we see,
971 that wouldn't be valid XML however, since in XML -- has to terminate a comment
979 Comment semantics: nesting
981 <!--<!-- no, we're not going to do anything fancy here -->-->
988 Comment semantics: unclosed comment at end
990 <!--This comment will run out to the end of the document
996 Comment in template title
1005 Comment on its own line post-expand
1017 Comment on its own line post-expand with non-significant whitespace
1029 ### paragraph wraping tests
1043 Block tag on one line
1055 Block tag on both lines
1067 Multiple lines without block tags
1085 Empty lines between lines with block tags
1115 ### Preformatted text
1124 And a [[Main Page|link]]
1130 And a <a href="/wiki/Main_Page" title="Main Page">link</a>
1135 Ident preformatting with inline content
1146 <pre> with <nowiki> inside (compatibility with 1.6 and earlier)
1163 Regression with preformatted in <center>
1176 # Expected output in the following test is not really expected (there should be
1177 # <pre> in the output) -- it's only testing for well-formedness.
1179 Bug 6200: Preformatted in <blockquote>
1192 <pre> with attributes (bug 3202)
1194 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1196 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
1201 <pre> with width attribute (bug 3202)
1203 <pre width="8">Narrow screen goodies</pre>
1205 <pre width="8">Narrow screen goodies</pre>
1210 <pre> with forbidden attribute (bug 3202)
1212 <pre width="8" onmouseover="alert(document.cookie)">Narrow screen goodies</pre>
1214 <pre width="8">Narrow screen goodies</pre>
1219 Entities inside <pre>
1228 <pre> with forbidden attribute values (bug 3202)
1230 <pre width="8" style="border-width: expression(alert(document.cookie))">Narrow screen goodies</pre>
1232 <pre width="8" style="/* insecure input */">Narrow screen goodies</pre>
1237 <nowiki> inside <pre> (bug 13238)
1245 <pre><nowiki><nowiki></nowiki>Foo<nowiki></nowiki></nowiki></pre>
1253 <pre><nowiki>Foo</nowiki></pre>
1258 <nowiki> and <pre> preference (first one wins)
1289 </pre> inside nowiki
1291 <nowiki></pre></nowiki>
1298 Templates: Indent-Pre: 1a. Templates that break a line should suppress <pre>
1306 Templates: Indent-Pre: 1b. Templates that break a line should suppress <pre>
1316 Templates: Indent-Pre: 1c: Wrapping should be based on expanded content
1328 Templates: Indent-Pre: 1d: Wrapping should be based on expanded content
1349 Templates: Indent-Pre: 1e. Wrapping should be based on expanded content
1353 {{echo| foo}}{{echo| bar}}
1358 {{echo|<!--cmt--> foo}}
1360 <!--cmt-->{{echo| foo}}
1362 {{echo|{{echo| }}bar}}
1380 Templates: Indent-Pre: 1f: Wrapping should be based on expanded content
1417 Templates: Single-line variant of parameter whitespace stripping test
1423 {{echo|{{echo| a}}}}
1425 {{echo|1={{echo| a}}}}
1438 Templates: Strip whitespace from named parameters, but not positional ones
1466 ### Parsoid-centric tests for testing RT edge cases for pre
1470 1a. Indent-Pre and Comments
1483 1b. Indent-Pre and Comments
1496 1c. Indent-Pre and Comments
1509 2a. Indent-Pre and tables
1530 2b. Indent-Pre and tables
1546 2c. Indent-Pre and tables (bug 42252)
1563 3a. Indent-Pre and block tags (single-line html)
1571 <pre><span> foo </span>
1576 3b. Indent-Pre and block tags (pre-content on separate line)
1628 4. Multiple spaces at start-of-line
1647 5. White-space in indent-pre
1648 NOTE: the white-space char on 2nd line is significant
1661 ### HTML-pre (some to spec PHP parser behavior and some Parsoid-RT-centric)
1665 HTML-pre: 1. embedded newlines
1701 HTML-pre: 2: indented text
1714 HTML-pre: 3: other wikitext
1735 ### Definition lists
1742 <dl><dt> name </dt><dd> Definition
1748 Definition list for indentation only
1752 <dl><dd> Indented text
1758 Definition list with no space
1762 <dl><dt>name</dt><dd>Definition
1768 Definition list with URL link
1770 ; http://example.com/ : definition
1772 <dl><dt> <a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> </dt><dd> definition
1778 Definition list with bracketed URL link
1780 ;[http://www.example.com/ Example]:Something about it
1782 <dl><dt><a rel="nofollow" class="external text" href="http://www.example.com/">Example</a></dt><dd>Something about it
1788 Definition list with wikilink containing colon
1790 ; [[Help:FAQ]]: The least-read page on Wikipedia
1792 <dl><dt> <a href="/index.php?title=Help:FAQ&action=edit&redlink=1" class="new" title="Help:FAQ (page does not exist)">Help:FAQ</a></dt><dd> The least-read page on Wikipedia
1797 # At Brion's and JeLuF's insistence... :)
1799 Definition list with news link containing colon
1801 ; news:alt.wikipedia.rox: This isn't even a real newsgroup!
1803 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a></dt><dd> This isn't even a real newsgroup!
1809 Malformed definition list with colon
1811 ; news:alt.wikipedia.rox -- don't crash or enter an infinite loop
1813 <dl><dt> <a rel="nofollow" class="external free" href="news:alt.wikipedia.rox">news:alt.wikipedia.rox</a> -- don't crash or enter an infinite loop
1819 Definition lists: colon in external link text
1821 ; [http://www.wikipedia2.org/ Wikipedia : The Next Generation]: OK, I made that up
1823 <dl><dt> <a rel="nofollow" class="external text" href="http://www.wikipedia2.org/">Wikipedia : The Next Generation</a></dt><dd> OK, I made that up
1829 Definition lists: colon in HTML attribute
1831 ;<b style="display: inline">bold</b>
1833 <dl><dt><b style="display: inline">bold</b>
1839 Definition lists: self-closed tag
1841 ;one<br/>two : two-line fun
1843 <dl><dt>one<br />two </dt><dd> two-line fun
1849 Bug 11748: Literal closing tags
1853 <dd>test test test test test</dd>
1855 <dd>test test test test test</dd>
1860 <dd>test test test test test</dd>
1862 <dd>test test test test test</dd>
1868 Definition and unordered list using wiki syntax nested in unordered list using html tags.
1871 ; term : description
1877 <dl><dt> term </dt><dd> description
1888 Definition list with empty definition and following paragraph
1893 <dl><dt> term</dt><dd>
1900 Nested definition lists using html syntax
1917 Definition Lists: No nesting: Multiple dd's
1931 Definition Lists: Indentation: Regular
1947 Definition Lists: Indentation: Missing 1st level
1961 Definition Lists: Indentation: Multi-level indent
1965 <dl><dd><dl><dd><dl><dd>i3
1973 Definition Lists: Hacky use to indent tables
1980 should be left alone
1982 <dl><dd><dl><dd><table>
1987 </td></tr></table></dd></dl></dd></dl>
1989 should be left alone
1992 ## The PHP parser treats : items (dd) without a corresponding ; item (dt)
1993 ## as an empty dt item. It also ignores all but the last ";" when followed
1994 ## by ":" later on. So, ";" are not ignored in ";;;t3" but are ignored in
1995 ## ";;;t3 :d1". So, PHP parser behavior is a little inconsistent wrt multiple
1998 ## Ex: ";;t2 ::d2" is transformed into:
2010 ## But, Parsoid treats "; :" as a tight atomic unit and excess ":" as plain text
2011 ## So, the same wikitext above (;;t2 ::d2) is transformed into:
2022 ## All Parsoid only definition list tests have this difference.
2024 ## See also: https://bugzilla.wikimedia.org/show_bug.cgi?id=6569
2025 ## and http://lists.wikimedia.org/pipermail/wikitext-l/2011-November/000483.html
2028 Table / list interaction: indented table with lists in table contents
2050 </td></tr></table></dd></dl>
2055 Table / list interaction: lists nested in tables nested in indented lists
2080 </td></tr></table></dd></dl>
2088 Definition Lists: Nesting: Multi-level (Parsoid only)
2118 Definition Lists: Nesting: Test 2 (Parsoid only)
2138 Definition Lists: Nesting: Test 3 (Parsoid only)
2166 Definition Lists: Nesting: Test 4
2171 <dl><dd><dl><dd><dl><dt>t3
2180 ## The Parsoid team believes the following three test exposes a
2181 ## bug in the PHP parser. (Parsoid team thinks the PHP parser is
2182 ## wrong to close the <dl> after the <dt> containing the <ul>.)
2184 Definition Lists: Mixed Lists: Test 1 (php)
2192 <dl><dd><dl><dt><ul><li> foo
2202 Definition Lists: Mixed Lists: Test 1 (parsoid)
2210 <dl><dd><dl><dt><ul><li> foo
2211 </li></ul></dt><dd><ul><li> bar
2212 </li></ul></dd><dt> baz</dt></dl></dd></dl>
2216 Definition Lists: Mixed Lists: Test 2
2230 Definition Lists: Mixed Lists: Test 3
2235 <ul><li><dl><dd><dl><dd><dl><dd> d1
2246 Definition Lists: Mixed Lists: Test 4
2251 <ul><li><dl><dt>d1 </dt><dd>d2
2252 </dd><dt>d3 </dt><dd>d4
2260 Definition Lists: Mixed Lists: Test 5
2275 Definition Lists: Mixed Lists: Test 6
2280 <ol><li><ul><li><dl><dd>d1
2292 Definition Lists: Mixed Lists: Test 7
2306 Definition Lists: Mixed Lists: Test 8
2322 Definition Lists: Mixed Lists: Test 9
2326 <ul><li><dl><dt>foo </dt><dd>bar
2334 Definition Lists: Mixed Lists: Test 10
2338 <ul><li><ol><li><dl><dt>foo </dt><dd>bar
2345 # The Parsoid team disagrees with the PHP parser's seemingly-random
2346 # rules regarding dd/dt on the next two tests. Parsoid is more
2347 # consistent, and recognizes the shared nesting and keeps the
2348 # still-open tags around until the nesting is complete.
2351 Definition Lists: Mixed Lists: Test 11 (php)
2358 <ul><li><ol><li><ul><li><ol><li><dl><dt>foo </dt><dd><ul><li><dl><dt><dl><dt>bar
2363 <dl><dt>boo </dt><dd>baz
2372 Definition Lists: Mixed Lists: Test 11 (parsoid)
2379 <ul><li><ol><li><ul><li><ol><li><dl><dt><ul><li><dl><dt><dl><dt>foo </dt><dd>bar
2380 </dd></dl></dt></dl></li></ul></dt><dt>boo </dt><dd>baz</dd></dl></li></ol></li></ul></li></ol></li></ul>
2385 Definition Lists: Weird Ones: Test 1 (php)
2389 *#;*::;; foo : bar (who uses this?)
2391 <ul><li><ol><li><dl><dt> foo </dt><dd><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> bar (who uses this?)
2403 Definition Lists: Weird Ones: Test 1 (parsoid)
2407 *#;*::;; foo : bar (who uses this?)
2409 <ul><li><ol><li><dl><dt><ul><li><dl><dd><dl><dd><dl><dt><dl><dt> foo </dt><dd> bar (who uses this?)</dd></dl></dt></dl></dd></dl></dd></dl></li></ul></dt></dl></li></ol></li></ul>
2416 External links: non-bracketed
2418 Non-bracketed: http://example.com
2420 <p>Non-bracketed: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2425 External links: numbered
2427 Numbered: [http://example.com]
2428 Numbered: [http://example.net]
2429 Numbered: [http://example.com]
2431 <p>Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[1]</a>
2432 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.net">[2]</a>
2433 Numbered: <a rel="nofollow" class="external autonumber" href="http://example.com">[3]</a>
2438 External links: specified text
2440 Specified text: [http://example.com link]
2442 <p>Specified text: <a rel="nofollow" class="external text" href="http://example.com">link</a>
2447 External links: trail
2449 Linktrails should not work for external links: [http://example.com link]s
2451 <p>Linktrails should not work for external links: <a rel="nofollow" class="external text" href="http://example.com">link</a>s
2456 External links: dollar sign in URL
2458 http://example.com/1$2345
2460 <p><a rel="nofollow" class="external free" href="http://example.com/1$2345">http://example.com/1$2345</a>
2465 External links: dollar sign in URL (named)
2467 [http://example.com/1$2345]
2469 <p><a rel="nofollow" class="external autonumber" href="http://example.com/1$2345">[1]</a>
2474 External links: open square bracket forbidden in URL (bug 4377)
2476 http://example.com/1[2345
2478 <p><a rel="nofollow" class="external free" href="http://example.com/1">http://example.com/1</a>[2345
2483 External links: open square bracket forbidden in URL (named) (bug 4377)
2485 [http://example.com/1[2345]
2487 <p><a rel="nofollow" class="external text" href="http://example.com/1">[2345</a>
2492 External links: nowiki in URL link text (bug 6230)
2494 [http://example.com/ <nowiki>''example site''</nowiki>]
2496 <p><a rel="nofollow" class="external text" href="http://example.com/">''example site''</a>
2501 External links: newline forbidden in text (bug 6230 regression check)
2503 [http://example.com/ first
2506 <p>[<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a> first
2512 External links: Pipe char between url and text
2514 [http://example.com | link]
2516 <p><a rel="nofollow" class="external text" href="http://example.com">| link</a>
2521 External links: protocol-relative URL in brackets
2523 [//example.com/ Test]
2525 <p><a rel="nofollow" class="external text" href="//example.com/">Test</a>
2530 External links: protocol-relative URL in brackets without text
2534 <p><a rel="nofollow" class="external autonumber" href="//example.com">[1]</a>
2539 External links: protocol-relative URL in free text is left alone
2543 <p>//example.com/Foo
2548 External links: protocol-relative URL in the middle of a word is left alone (bug 30269)
2550 foo//example.com/Foo
2552 <p>foo//example.com/Foo
2559 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2561 <p>External image: <img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2566 External image from https
2568 External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png
2570 <p>External image from https: <img src="https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" />
2575 Link to non-http image, no img tag
2577 Link to non-http image, no img tag: ftp://example.com/test.jpg
2579 <p>Link to non-http image, no img tag: <a rel="nofollow" class="external free" href="ftp://example.com/test.jpg">ftp://example.com/test.jpg</a>
2584 External links: terminating separator
2586 Terminating separator: http://example.com/thing,
2588 <p>Terminating separator: <a rel="nofollow" class="external free" href="http://example.com/thing">http://example.com/thing</a>,
2593 External links: intervening separator
2595 Intervening separator: http://example.com/1,2,3
2597 <p>Intervening separator: <a rel="nofollow" class="external free" href="http://example.com/1,2,3">http://example.com/1,2,3</a>
2602 External links: old bug with URL in query
2604 Old bug with URL in query: [http://example.com/thing?url=http://example.com link]
2606 <p>Old bug with URL in query: <a rel="nofollow" class="external text" href="http://example.com/thing?url=http://example.com">link</a>
2611 External links: old URL-in-URL bug, mixed protocols
2613 And again with mixed protocols: [ftp://example.com?url=http://example.com link]
2615 <p>And again with mixed protocols: <a rel="nofollow" class="external text" href="ftp://example.com?url=http://example.com">link</a>
2620 External links: URL in text
2622 URL in text: [http://example.com http://example.com]
2624 <p>URL in text: <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>
2629 External links: Clickable images
2631 ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png]
2633 <p>ja-style clickable images: <a rel="nofollow" class="external text" href="http://example.com"><img src="http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png" alt="Ncwikicol.png" /></a>
2638 External links: raw ampersand
2640 Old & use: http://x&y
2642 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2647 External links: encoded ampersand
2649 Old & use: http://x&y
2651 <p>Old & use: <a rel="nofollow" class="external free" href="http://x&y">http://x&y</a>
2656 External links: encoded equals (bug 6102)
2658 http://example.com/?foo=bar
2660 <p><a rel="nofollow" class="external free" href="http://example.com/?foo=bar">http://example.com/?foo=bar</a>
2665 External links: [raw ampersand]
2667 Old & use: [http://x&y]
2669 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2674 External links: [encoded ampersand]
2676 Old & use: [http://x&y]
2678 <p>Old & use: <a rel="nofollow" class="external autonumber" href="http://x&y">[1]</a>
2683 External links: [encoded equals] (bug 6102)
2685 [http://example.com/?foo=bar]
2687 <p><a rel="nofollow" class="external autonumber" href="http://example.com/?foo=bar">[1]</a>
2692 External links: [IDN ignored character reference in hostname; strip it right off]
2694 [http://e‌xample.com/]
2696 <p><a rel="nofollow" class="external autonumber" href="http://example.com/">[1]</a>
2700 # FIXME: This test (the IDN characters in the text of a link) is an inconsistency.
2701 # Where an external link could easily circumvent the sanitization of the text of
2702 # a link like this (where an IDN-ignore character is in the URL somewhere), this
2703 # test demands a higher standard. That's a bit strange.
2707 # http://example.com -> [http://example.com|http://example.com]
2708 # [http://example.com|http://example.com] -> [http://example.com|http://example.com]
2710 # The first example is sanitized, but the second is not. Any security benefits
2711 # from this production are trivial to circumvent. Either remove this test and
2712 # let the parser(s) do their thing unaccosted, or fix the inconsistency and change
2713 # the test accordingly.
2718 External links: IDN ignored character reference in hostname; strip it right off
2720 http://e‌xample.com/
2722 <p><a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>
2727 External links: www.jpeg.org (bug 554)
2731 <p><a rel="nofollow" class="external free" href="http://www.jpeg.org">http://www.jpeg.org</a>
2736 External links: URL within URL (original bug 2)
2738 [http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp]
2740 <p><a rel="nofollow" class="external autonumber" href="http://www.unausa.org/newindex.asp?place=http://www.unausa.org/programs/mun.asp">[1]</a>
2745 BUG 361: URL inside bracketed URL
2747 [http://www.example.com/foo http://www.example.com/bar]
2749 <p><a rel="nofollow" class="external text" href="http://www.example.com/foo">http://www.example.com/bar</a>
2754 BUG 361: URL within URL, not bracketed
2756 http://www.example.com/foo?=http://www.example.com/bar
2758 <p><a rel="nofollow" class="external free" href="http://www.example.com/foo?=http://www.example.com/bar">http://www.example.com/foo?=http://www.example.com/bar</a>
2763 BUG 289: ">"-token in URL-tail
2765 http://www.example.com/<hello>
2767 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><hello>
2772 BUG 289: literal ">"-token in URL-tail
2774 http://www.example.com/<b>html</b>
2776 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a><b>html</b>
2781 BUG 289: ">"-token in bracketed URL
2783 [http://www.example.com/<hello> stuff]
2785 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><hello> stuff</a>
2790 BUG 289: literal ">"-token in bracketed URL
2792 [http://www.example.com/<b>html</b> stuff]
2794 <p><a rel="nofollow" class="external text" href="http://www.example.com/"><b>html</b> stuff</a>
2799 BUG 289: literal double quote at end of URL
2801 http://www.example.com/"hello"
2803 <p><a rel="nofollow" class="external free" href="http://www.example.com/">http://www.example.com/</a>"hello"
2808 BUG 289: literal double quote in bracketed URL
2810 [http://www.example.com/"hello" stuff]
2812 <p><a rel="nofollow" class="external text" href="http://www.example.com/">"hello" stuff</a>
2817 External links: multiple legal whitespace is fine, Magnus. Don't break it please. (bug 5081)
2819 [http://www.example.com test]
2821 <p><a rel="nofollow" class="external text" href="http://www.example.com">test</a>
2826 External links: link text with spaces
2828 [http://www.example.com a b c]
2829 [http://www.example.com ''a'' ''b'']
2831 <p><a rel="nofollow" class="external text" href="http://www.example.com">a b c</a>
2832 <a rel="nofollow" class="external text" href="http://www.example.com"><i>a</i> <i>b</i></a>
2837 External links: wiki links within external link (Bug 3695)
2839 [http://example.com [[wikilink]] embedded in ext link]
2841 <p><a rel="nofollow" class="external text" href="http://example.com"></a><a href="/index.php?title=Wikilink&action=edit&redlink=1" class="new" title="Wikilink (page does not exist)">wikilink</a><a rel="nofollow" class="external text" href="http://example.com"> embedded in ext link</a>
2846 BUG 787: Links with one slash after the url protocol are invalid
2850 [http:/example.com title]
2852 <p>http:/example.com
2853 </p><p>[http:/example.com title]
2858 Bracketed external links with template-generated invalid target
2860 [{{echo|http:/example.com}} title]
2862 <p>[http:/example.com title]
2867 Bug 2702: Mismatched <i>, <b> and <a> tags are invalid
2869 ''[http://example.com text'']
2870 [http://example.com '''text]'''
2871 ''Something [http://example.com in italic'']
2872 ''Something [http://example.com mixed''''', even bold]'''
2873 '''''Now [http://example.com both''''']
2875 <p><a rel="nofollow" class="external text" href="http://example.com"><i>text</i></a>
2876 <a rel="nofollow" class="external text" href="http://example.com"><b>text</b></a>
2877 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>in italic</i></a>
2878 <i>Something </i><a rel="nofollow" class="external text" href="http://example.com"><i>mixed</i><b>, even bold</b></a>
2879 <i><b>Now </b></i><a rel="nofollow" class="external text" href="http://example.com"><i><b>both</b></i></a>
2885 Bug 4781: %26 in URL
2887 http://www.example.com/?title=AT%26T
2889 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=AT%26T">http://www.example.com/?title=AT%26T</a>
2893 # According to http://dev.w3.org/html5/spec/Overview.html#parsing-urls a plain
2894 # % is actually legal in HTML5. Any change in output would need testing though.
2896 Bug 4781, 5267: %25 in URL
2898 http://www.example.com/?title=100%25_Bran
2900 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=100%25_Bran">http://www.example.com/?title=100%25_Bran</a>
2905 Bug 4781, 5267: %28, %29 in URL
2907 http://www.example.com/?title=Ben-Hur_%281959_film%29
2909 <p><a rel="nofollow" class="external free" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">http://www.example.com/?title=Ben-Hur_%281959_film%29</a>
2915 Bug 4781: %26 in autonumber URL
2917 [http://www.example.com/?title=AT%26T]
2919 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=AT%26T">[1]</a>
2924 Bug 4781, 5267: %26 in autonumber URL
2926 [http://www.example.com/?title=100%25_Bran]
2928 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=100%25_Bran">[1]</a>
2933 Bug 4781, 5267: %28, %29 in autonumber URL
2935 [http://www.example.com/?title=Ben-Hur_%281959_film%29]
2937 <p><a rel="nofollow" class="external autonumber" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">[1]</a>
2943 Bug 4781: %26 in bracketed URL
2945 [http://www.example.com/?title=AT%26T link]
2947 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=AT%26T">link</a>
2952 Bug 4781, 5267: %26 in bracketed URL
2954 [http://www.example.com/?title=100%25_Bran link]
2956 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=100%25_Bran">link</a>
2961 Bug 4781, 5267: %28, %29 in bracketed URL
2963 [http://www.example.com/?title=Ben-Hur_%281959_film%29 link]
2965 <p><a rel="nofollow" class="external text" href="http://www.example.com/?title=Ben-Hur_%281959_film%29">link</a>
2970 External link containing double-single-quotes in text '' (bug 4598 sanity check)
2972 Some [http://example.com/ pretty ''italics'' and stuff]!
2974 <p>Some <a rel="nofollow" class="external text" href="http://example.com/">pretty <i>italics</i> and stuff</a>!
2979 External link containing double-single-quotes in text embedded in italics (bug 4598 sanity check)
2981 ''Some [http://example.com/ pretty ''italics'' and stuff]!''
2983 <p><i>Some </i><a rel="nofollow" class="external text" href="http://example.com/"><i>pretty </i>italics<i> and stuff</i></a><i>!</i>
2988 External link containing double-single-quotes with no space separating the url from text in italics
2990 [http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm''La muerte de Casagemas'' (1901) en el sitio de [[Museo Picasso (París)|Museo Picasso]].]
2992 <p><a rel="nofollow" class="external text" href="http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm"><i>La muerte de Casagemas</i> (1901) en el sitio de <a href="/index.php?title=Museo_Picasso_(Par%C3%ADs)&action=edit&redlink=1" class="new" title="Museo Picasso (París) (page does not exist)">Museo Picasso</a>.</a>
2997 URL-encoding in URL functions (single parameter)
2999 {{localurl:Some page|amp=&}}
3001 <p>/index.php?title=Some_page&amp=&
3006 URL-encoding in URL functions (multiple parameters)
3008 {{localurl:Some page|q=?&=&}}
3010 <p>/index.php?title=Some_page&q=?&amp=&
3017 http://example.com/index.php?foozoid%5B%5D=bar
3019 http://example.com/index.php?foozoid[]=bar
3021 <p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
3022 </p><p><a rel="nofollow" class="external free" href="http://example.com/index.php?foozoid%5B%5D=bar">http://example.com/index.php?foozoid%5B%5D=bar</a>
3027 IPv6 urls (bug 21261)
3031 http://[2404:130:0:1000::187:2]/index.php
3033 <p><a rel="nofollow" class="external free" href="http://[2404:130:0:1000::187:2]/index.php">http://[2404:130:0:1000::187:2]/index.php</a>
3038 Non-extlinks in brackets
3047 [{{echo|foo}} ''bar'']
3048 [{{echo|foo}}l's] errand
3049 [{{echo|foo}}l's errand]
3051 [url=http://example.com]
3064 [url=<a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>]
3075 Normal text. '''Bold text.''' Normal text. ''Italic text.''
3077 Normal text. '''''Bold italic text.''''' Normal text.
3079 <p>Normal text. <b>Bold text.</b> Normal text. <i>Italic text.</i>
3080 </p><p>Normal text. <i><b>Bold italic text.</b></i> Normal text.
3086 Unclosed and unmatched quotes (php)
3090 '''''Bold italic text '''with bold deactivated''' in between.'''''
3092 '''''Bold italic text ''with italic deactivated'' in between.'''''
3096 ..spanning two paragraphs (should not work).'''
3098 '''Bold tag left open
3100 ''Italic tag left open
3104 <!-- Unmatching number of opening, closing tags: -->
3105 '''This year''''s election ''should'' beat '''last year''''s.
3107 ''Tom'''s car is bigger than ''Susan'''s.
3109 Plain ''italic'''s plain
3111 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3112 </p><p><b><i>Bold italic text </i>with italic deactivated<i> in between.</i></b>
3113 </p><p><b>Bold text..</b>
3114 </p><p>..spanning two paragraphs (should not work).
3115 </p><p><b>Bold tag left open</b>
3116 </p><p><i>Italic tag left open</i>
3118 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3119 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3120 </p><p>Plain <i>italic'</i>s plain
3123 # Parsoid inserts an empty bold tag pair at the end of the line, that the PHP
3124 # parser strips. The wikitext contains just the first half of the bold
3125 # quote pair. (There's also a case where Parsoid nests <b> and <i>
3126 # differently than the PHP parser.)
3128 Unclosed and unmatched quotes (parsoid)
3132 '''''Bold italic text '''with bold deactivated''' in between.'''''
3134 '''''Bold italic text ''with italic deactivated'' in between.'''''
3138 ..spanning two paragraphs (should not work).'''
3140 '''Bold tag left open
3142 ''Italic tag left open
3146 <!-- Unmatching number of opening, closing tags: -->
3147 '''This year''''s election ''should'' beat '''last year''''s.
3149 ''Tom'''s car is bigger than ''Susan'''s.
3151 Plain ''italic'''s plain
3153 <p><i><b>Bold italic text </b>with bold deactivated<b> in between.</b></i>
3154 </p><p><i><b>Bold italic text </b></i><b>with italic deactivated<i> in between.</i></b>
3155 </p><p><b>Bold text..</b>
3156 </p><p>..spanning two paragraphs (should not work).<b></b>
3157 </p><p><b>Bold tag left open</b>
3158 </p><p><i>Italic tag left open</i>
3160 </p><p><b>This year'</b>s election <i>should</i> beat <b>last year'</b>s.
3161 </p><p><i>Tom<b>s car is bigger than </b></i><b>Susan</b>s.
3162 </p><p>Plain <i>italic'</i>s plain
3169 ### some content taken from http://meta.wikimedia.org/wiki/MediaWiki_User%27s_Guide:_Using_tables
3172 # This should not produce <table></table> as <table><tr><td></td></tr></table>
3173 # is the bare minimun required by the spec, see:
3174 # http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_Basic_Tables
3176 A table with no data. (php)
3183 # Parsoid team replies: empty table tags are legal in HTML5
3185 A table with no data. (parsoid)
3194 # A table with nothing but a caption is invalid XHTML, we might want to render
3195 # this as <p>caption</p>
3197 A table with nothing but a caption (php)
3207 </caption><tr><td></td></tr></table>
3210 # Parsoid team replies: table with only a caption is legal in HTML5
3212 A table with nothing but a caption (parsoid)
3220 <table><caption> caption</caption></table>
3224 A table with caption with default-spaced attributes and a table row
3227 |+ style="color: red;" | caption1
3233 <caption style="color: red;"> caption1
3242 A table with captions with non-default spaced attributes and a table row
3245 |+style="color: red;"|caption2
3246 |+ style="color: red;"| caption3
3252 <caption style="color: red;">caption2
3254 <caption style="color: red;"> caption3
3263 Table td-cell syntax variations
3267 | foo bar foo || baz
3268 | style='color:red;' | baz
3269 | style='color:red;' || baz
3276 <td> foo bar foo </td>
3279 <td style="color:red;"> baz
3281 <td> style='color:red;' </td>
3309 Simple table but with multiple dashes for row wikitext
3327 Multiplication table
3329 {| border="1" cellpadding="2"
3330 |+Multiplication table
3332 ! × !! 1 !! 2 !! 3
3350 <table border="1" cellpadding="2">
3351 <caption>Multiplication table
3398 Accept "||" in table headings
3413 Accept "||" in indented table headings
3423 </th></tr></table></dd></dl>
3428 Accept empty attributes in td/th cells (td/th cells starting with leading ||)
3445 Accept "| !" at start of line in tables (ignore !-attribute)
3449 | !style="color:red" | bar
3461 Allow +/- in 2nd and later cells in a row, in 1st cell when td-attrs are present, or in 1st cell when there is a space between "|" and +/-
3465 |style='color:red;'|+1
3466 |style='color:blue;'|-1
3478 <td style="color:red;">+1
3480 <td style="color:blue;">-1
3504 |rowspan=2| Cell 2, row 1 (and 2)
3515 <td rowspan="2"> Cell 2, row 1 (and 2)
3533 {| bgcolor=#ABCDEF border=2
3538 |the original table again
3546 <table bgcolor="#ABCDEF" border="2">
3554 <td>the original table again
3560 Invalid attributes in table cell (bug 1830)
3575 Table security: embedded pipes (http://lists.wikimedia.org/mailman/htdig/wikitech-l/2006-April/022293.html)
3578 | |[ftp://|x||]" onmouseover="alert(document.cookie)">test
3582 <td>[<a rel="nofollow" class="external free" href="ftp://%7Cx">ftp://%7Cx</a></td>
3583 <td>]" onmouseover="alert(document.cookie)">test
3592 Indented table markup mixed with indented pre content (proposed in bug 6200)
3597 Text that should be rendered preformatted
3605 <pre>Text that should be rendered preformatted
3614 Template-generated table cell attributes and cell content
3622 <td style="color: red"> Foo
3628 Table with row followed by newlines and table heading
3646 Table with empty line following the start tag
3663 # FIXME: Preserve the attribute properly (with an empty string as value) in
3664 # the PHP parser. Parsoid implements the behavior below.
3666 Table attributes with empty value
3682 Wikitext table with a lot of comments
3705 Wikitext table with double-line table cell
3722 Table cell with a single comment
3738 # The expected HTML structure in this test is debatable. The PHP parser does
3739 # not parse this kind of table at all. The main focus for Parsoid is on
3740 # round-tripping, so this output is ok for now. TODO: revisit!
3742 Wikitext table with html-syntax row (Parsoid)
3754 <td>foo</td></tr></tbody></table>
3761 Plain link, capitalized
3765 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
3770 Plain link, uncapitalized
3774 <p><a href="/wiki/Main_Page" title="Main Page">main Page</a>
3781 [[Main Page|The Main Page]]
3783 <p><a href="/wiki/Main_Page" title="Main Page">The Main Page</a>
3792 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig</a>
3797 Broken link with fragment
3799 [[Zigzagzogzagzig#zug]]
3801 <p><a href="/index.php?title=Zigzagzogzagzig&action=edit&redlink=1" class="new" title="Zigzagzogzagzig (page does not exist)">Zigzagzogzagzig#zug</a>
3806 Special page link with fragment
3808 [[Special:Version#anchor]]
3810 <p><a href="/wiki/Special:Version#anchor" title="Special:Version">Special:Version#anchor</a>
3815 Nonexistent special page link with fragment
3817 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
3819 <p><a href="/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (page does not exist)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
3826 xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]]
3828 <p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a>
3835 [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!!
3837 <p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!!
3848 Bug 43661: Piped links with identical prefixes
3850 [[prefixed article|prefixed articles with spaces]]
3852 [[prefixed article|prefixed articlesaoeu]]
3854 [[Main Page|Main Page test]]
3856 <p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articles with spaces</a>
3857 </p><p><a href="/wiki/Prefixed_article" title="Prefixed article">prefixed articlesaoeu</a>
3858 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page test</a>
3864 Link with HTML entity in suffix / tail
3866 [[Main Page]]", [[Main Page]]a
3868 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>", <a href="/wiki/Main_Page" title="Main Page">Main Page</a>a
3873 Link with 3 brackets
3882 Piped link with 3 brackets
3884 [[[main page|the main page]]]
3886 <p>[[[main page|the main page]]]
3891 Link with multiple pipes
3893 [[Main Page|The|Main|Page]]
3895 <p><a href="/wiki/Main_Page" title="Main Page">The|Main|Page</a>
3902 [[Talk:Parser testing]], [[Meta:Disclaimers]]
3904 <p><a href="/index.php?title=Talk:Parser_testing&action=edit&redlink=1" class="new" title="Talk:Parser testing (page does not exist)">Talk:Parser testing</a>, <a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">Meta:Disclaimers</a>
3909 Piped link to namespace
3911 [[Meta:Disclaimers|The disclaimers]]
3913 <p><a href="/index.php?title=Meta:Disclaimers&action=edit&redlink=1" class="new" title="Meta:Disclaimers (page does not exist)">The disclaimers</a>
3920 [[Usually caused by a typo (oops}]]
3922 <p>[[Usually caused by a typo (oops}]]
3927 Link containing % (not as a hex sequence)
3931 <p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a>
3936 Link containing % as a single hex sequence interpreted to char
3940 <p><a href="/index.php?title=7%25_Solution&action=edit&redlink=1" class="new" title="7% Solution (page does not exist)">7% Solution</a>
3945 Link containing % as a double hex sequence interpreted to hex sequence
3949 <p>[[7%2525 Solution]]
3954 Link containing "#<" and "#>" % as a hex sequences- these are valid section anchors
3955 Example for such a section: == < ==
3957 [[%23%3c]][[%23%3e]]
3959 <p><a href="#.3C">#<</a><a href="#.3E">#></a>
3964 Link containing "<#" and ">#" as a hex sequences
3966 [[%3c%23]][[%3e%23]]
3968 <p>[[%3c%23]][[%3e%23]]
3973 Link containing an equals sign
3975 [[Special:BookSources/isbn=4-00-026157-6]]
3977 <p><a href="/wiki/Special:BookSources/isbn%3D4-00-026157-6" title="Special:BookSources/isbn=4-00-026157-6">Special:BookSources/isbn=4-00-026157-6</a>
3984 Just a test of an article title containing a tilde.
3987 # note that links containing signatures, like [[Foo~~~~]], are
3988 # massaged by the pre-save transform (PST) and so the tildes are never
3989 # seen by the parser.
3991 Link containing a tilde
3995 <p><a href="/wiki/Foo%7Ebar" title="Foo~bar">Foo~bar</a>
4000 Link containing double-single-quotes '' (bug 4598)
4002 [[Lista d''e paise d''o munno]]
4004 <p><a href="/index.php?title=Lista_d%27%27e_paise_d%27%27o_munno&action=edit&redlink=1" class="new" title="Lista d''e paise d''o munno (page does not exist)">Lista d''e paise d''o munno</a>
4009 Link containing double-single-quotes '' in text (bug 4598 sanity check)
4011 Some [[Link|pretty ''italics'' and stuff]]!
4013 <p>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!
4018 Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)
4020 ''Some [[Link|pretty ''italics'' and stuff]]!
4022 <p><i>Some <a href="/index.php?title=Link&action=edit&redlink=1" class="new" title="Link (page does not exist)">pretty <i>italics</i> and stuff</a>!</i>
4027 Link with double quotes in title part (literal) and alternate part (interpreted)
4029 [[File:Denys Savchenko ''Pentecoste''.jpg]]
4033 [[''Pentecoste''|Pentecoste]]
4035 [[''Pentecoste''|''Pentecoste'']]
4037 <p><a href="/index.php?title=Special:Upload&wpDestFile=Denys_Savchenko_%27%27Pentecoste%27%27.jpg" class="new" title="File:Denys Savchenko ''Pentecoste''.jpg">File:Denys Savchenko <i>Pentecoste</i>.jpg</a>
4038 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">''Pentecoste''</a>
4039 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)">Pentecoste</a>
4040 </p><p><a href="/index.php?title=%27%27Pentecoste%27%27&action=edit&redlink=1" class="new" title="''Pentecoste'' (page does not exist)"><i>Pentecoste</i></a>
4045 Broken image links with HTML captions (bug 39700)
4047 [[File:Nonexistent|<script></script>]]
4048 [[File:Nonexistent|100px|<script></script>]]
4049 [[File:Nonexistent|<]]
4050 [[File:Nonexistent|a<i>b</i>c]]
4052 <p><a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4053 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><script></script></a>
4054 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent"><</a>
4055 <a href="/index.php?title=Special:Upload&wpDestFile=Nonexistent" class="new" title="File:Nonexistent">abc</a>
4062 [[http://www.example.com]]
4064 <p>[<a rel="nofollow" class="external autonumber" href="http://www.example.com">[1]</a>]
4069 Plain link to URL with link text
4071 [[http://www.example.com Link text]]
4073 <p>[<a rel="nofollow" class="external text" href="http://www.example.com">Link text</a>]
4078 Plain link to protocol-relative URL
4080 [[//www.example.com]]
4082 <p>[<a rel="nofollow" class="external autonumber" href="//www.example.com">[1]</a>]
4087 Plain link to protocol-relative URL with link text
4089 [[//www.example.com Link text]]
4091 <p>[<a rel="nofollow" class="external text" href="//www.example.com">Link text</a>]
4096 Plain link to page with question mark in title
4102 <p><a href="/wiki/A%3Fb" title="A?b">A?b</a>
4103 </p><p><a href="/wiki/A%3Fb" title="A?b">Baz</a>
4108 # I'm fairly sure the expected result here is wrong.
4109 # We want these to be URL links, not pseudo-pages with URLs for titles....
4110 # However the current output is also pretty screwy.
4113 # I'm changing it to match the current output--it arguably makes more
4114 # sense in the light of the test above. Old expected result was:
4115 #<p>Piped link to URL: <a href="/index.php?title=Http://www.example.com&action=edit" class="new">an example URL</a>
4117 # But I think this test is bordering on "garbage in, garbage out" anyway.
4122 Piped link to URL: [[http://www.example.com|an example URL]]
4124 <p>Piped link to URL: [<a rel="nofollow" class="external text" href="http://www.example.com%7Can">example URL</a>]
4129 BUG 2: [[page|http://url/]] should link to page, not http://url/
4131 [[Main Page|http://url/]]
4133 <p><a href="/wiki/Main_Page" title="Main Page">http://url/</a>
4138 BUG 337: Escaped self-links should be bold
4142 [[Bug462]] [[Bug462]]
4144 <p><strong class="selflink">Bug462</strong> <strong class="selflink">Bug462</strong>
4149 Self-link to section should not be bold
4153 [[Main Page#section]]
4155 <p><a href="/wiki/Main_Page#section" title="Main Page">Main Page#section</a>
4166 Self-link to numeric title
4172 <p><strong class="selflink">0</strong>
4177 Link to numeric-equivalent title
4183 <p><a href="/wiki/00" title="00">00</a>
4188 <nowiki> inside a link
4190 [[Main<nowiki> Page</nowiki>]] [[Main Page|the main page <nowiki>[it's not very good]</nowiki>]]
4192 <p>[[Main Page]] <a href="/wiki/Main_Page" title="Main Page">the main page [it's not very good]</a>
4197 Non-breaking spaces in title
4199 [[ Main Page ]]
4201 <p><a href="/wiki/Main_Page" title="Main Page">  Main   Page  </a>
4206 Internal link with ca linktrail, surrounded by bold apostrophes (bug 27473 primary issue)
4212 <p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b>
4217 Internal link with ca linktrail, surrounded by italic apostrophes (bug 27473 primary issue)
4223 <p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i>
4228 Internal link with en linktrail: no apostrophes (bug 27473)
4234 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (page does not exist)">Something</a>'nice
4239 Internal link with ca linktrail with apostrophes (bug 27473)
4245 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (encara no existeix)">Something'nice</a>
4250 Internal link with kaa linktrail with apostrophes (bug 27473)
4256 <p><a href="/index.php?title=Something&action=edit&redlink=1" class="new" title="Something (bet ele jaratılmag'an)">Something'nice</a>
4267 Internal link with is link prefix
4271 Aðrir mótmælenda[[söfnuður|söfnuðir]] og
4273 <p>Aðrir <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a> og
4284 Internal link with is link trail and link prefix
4288 [[mótmælendatrú|xxx]]ar
4290 mótmælenda[[söfnuður]]
4291 mótmælenda[[söfnuður|söfnuðir]]
4292 mótmælenda[[söfnuður|söfnuðir]]xxx
4294 <p><a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">xxxar</a>
4295 <a href="/wiki/M%C3%B3tm%C3%A6lendatr%C3%BA" title="Mótmælendatrú">mótmælendatrúar</a>
4296 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuður</a>
4297 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðir</a>
4298 <a href="/wiki/S%C3%B6fnu%C3%B0ur" title="Söfnuður">mótmælendasöfnuðirxxx</a>
4303 Parsoid-centric test: Whitespace in ext- and wiki-links should be preserved
4311 [http://wp.org ''foo'']
4313 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> bar</a>
4314 </p><p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)"> <i>bar</i></a>
4315 </p><p><a rel="nofollow" class="external text" href="http://wp.org">foo</a>
4316 </p><p><a rel="nofollow" class="external text" href="http://wp.org"><i>foo</i></a>
4321 ### Interwiki links (see maintenance/interwiki.sql)
4325 Inline interwiki link
4327 [[MeatBall:SoftSecurity]]
4329 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a>
4334 Inline interwiki link with empty title (bug 2372)
4338 <p><a href="http://www.usemod.com/cgi-bin/mb.pl" class="extiw" title="meatball:">MeatBall:</a>
4343 Interwiki link encoding conversion (bug 1636)
4345 *[[Wikipedia:ro:Olteniţa]]
4346 *[[Wikipedia:ro:Olteniţa]]
4348 <ul><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a>
4349 </li><li><a href="http://en.wikipedia.org/wiki/ro:Olteni%C5%A3a" class="extiw" title="wikipedia:ro:Olteniţa">Wikipedia:ro:Olteniţa</a>
4355 Interwiki link with fragment (bug 2130)
4357 [[MeatBall:SoftSecurity#foo]]
4359 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity#foo" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity#foo</a>
4374 Double interlanguage link
4385 Interlanguage link, with prefix links
4397 Double interlanguage link, with prefix links (bug 8897)
4410 Parsoid-specific test: Wikilinks with should RT properly
4416 <p><a href="/index.php?title=WW_II&action=edit&redlink=1" class="new" title="WW II (lonkásá ezalí tɛ̂)">WW II</a>
4434 Broken br tag sanitization
4443 Incorrecly removing closing slashes from correctly formed XHTML
4445 <br style="clear:both;" />
4447 <p><br style="clear:both;" />
4452 Failing to transform badly formed HTML into correct XHTML
4454 <br style="clear: left;">
4455 <br style="clear: right;">
4456 <br style="clear: both;">
4458 <p><br style="clear: left;" />
4459 <br style="clear: right;" />
4460 <br style="clear: both;" />
4465 Handling html with a div self-closing tag
4474 <p><div title />
4478 <p><div title=bar />
4479 <div title=bar/>
4481 <div title="bar/"></div>
4487 Handling html with a br self-closing tag
4496 <p><br title="title" />
4497 <br title="title" />
4506 Horizontal ruler (should it add that extra space?)
4520 Horizontal ruler -- 4+ dashes render hr
4529 Horizontal ruler -- eats additional dashes on the same line
4538 Horizontal ruler -- does not collapse dashes on consecutive lines
4549 Horizontal ruler -- <4 dashes render as plain text
4558 Horizontal ruler -- Supports content following dashes on same line
4567 ### Block-level elements
4590 <ol><li>Numbered list
4607 ***#Number on level 4
4609 **#Number on level 3
4610 **#Number on level 3
4614 #** Level 3, but ordered
4617 <ol><li> with numbers
4619 <ul><li> and bullets
4621 <ol><li> and numbers
4623 </li><li>bullets again
4624 <ul><li>bullet level 2
4625 <ul><li>bullet level 3
4626 <ol><li>Number on level 4
4629 </li><li>bullet level 2
4630 <ol><li>Number on level 3
4631 </li><li>Number on level 3
4634 <ol><li>number level 2
4637 <ul><li><ul><li> Level 3
4641 <ol><li><ul><li><ul><li> Level 3, but ordered
4675 Nested lists 3 (first element empty)
4688 Nested lists 4 (first element empty)
4701 Nested lists 5 (both elements empty)
4714 Nested lists 6 (both elements empty)
4727 Nested lists 7 (skip initial nesting levels)
4731 <ul><li><ul><li><ul><li> foo
4739 Nested lists 8 (multiple nesting transitions)
4747 <ul><li><ul><li> bar
4757 1. Lists with start-of-line-transparent tokens before bullets: Comments
4771 2. Lists with start-of-line-transparent tokens before bullets: Template close
4783 Unbalanced closing block tags break a list
4784 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
4794 </li></ul></div><div>
4800 Unbalanced closing non-block tags don't break a list
4801 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
4811 <ul><li>a<span></span>
4817 Unclosed formatting tags that straddle lists are closed and reopened
4818 (Parsoid-only since php parser generates broken html -- relies on Tidy to fix up)
4826 </li><li> <s> b </s>
4831 List embedded in a non-block tag
4832 (Ugly Parsoid output -- worth fixing; Disabled for PHP parser since it relies on Tidy)
4840 <p><small></small></p>
4846 <p><small></small></p>
4850 List items are not parsed correctly following a <pre> block (bug 785)
4856 <ul><li> <pre>foo</pre>
4857 </li><li> <pre>bar</pre>
4864 List items from template
4875 * notSOL{{inner list}}
4894 List interrupted by empty line or heading
4904 <ul><li><ul><li> bar
4907 <h2><span class="mw-headline" id="A_heading">A heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: A heading">edit</a>]</span></h2>
4908 <ul><li> Another list item
4914 Multiple list tags generated by templates
4929 Single-comment whitespace lines dont break lists, but multi-comment whitespace lines do
4932 <!--This line will NOT split the list-->
4934 <!--This line will NOT split the list either-->
4936 <!--foo--> <!--This line with more than 1 comment will split the list-->
4953 Magic Word: {{CURRENTDAY}}
4962 Magic Word: {{CURRENTDAY2}}
4971 Magic Word: {{CURRENTDAYNAME}}
4980 Magic Word: {{CURRENTDOW}}
4989 Magic Word: {{CURRENTMONTH}}
4998 Magic Word: {{CURRENTMONTHABBREV}}
5000 {{CURRENTMONTHABBREV}}
5007 Magic Word: {{CURRENTMONTHNAME}}
5009 {{CURRENTMONTHNAME}}
5016 Magic Word: {{CURRENTMONTHNAMEGEN}}
5018 {{CURRENTMONTHNAMEGEN}}
5025 Magic Word: {{CURRENTTIME}}
5034 Magic Word: {{CURRENTWEEK}} (@bug 4594)
5043 Magic Word: {{CURRENTYEAR}}
5052 Magic Word: {{FULLPAGENAME}}
5054 title=[[User:Ævar Arnfjörð Bjarmason]]
5058 <p>User:Ævar Arnfjörð Bjarmason
5063 Magic Word: {{FULLPAGENAMEE}}
5065 title=[[User:Ævar Arnfjörð Bjarmason]]
5069 <p>User:%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
5074 Magic Word: {{NAMESPACE}}
5076 title=[[User:Ævar Arnfjörð Bjarmason]]
5085 Magic Word: {{NAMESPACEE}}
5087 title=[[User:Ævar Arnfjörð Bjarmason]]
5096 Magic Word: {{NAMESPACENUMBER}}
5098 title=[[User:Ævar Arnfjörð Bjarmason]]
5107 Magic Word: {{NUMBEROFFILES}}
5116 Magic Word: {{PAGENAME}}
5118 title=[[User:Ævar Arnfjörð Bjarmason]]
5122 <p>Ævar Arnfjörð Bjarmason
5127 Magic Word: {{PAGENAME}} with metacharacters
5129 title=[['foo & bar = baz']]
5133 <p><i>'foo & bar = baz'</i>
5138 Magic Word: {{PAGENAME}} with metacharacters (bug 26781)
5140 title=[[*RFC 1234 http://example.com/]]
5144 <p>*RFC 1234 http://example.com/
5149 Magic Word: {{PAGENAMEE}}
5151 title=[[User:Ævar Arnfjörð Bjarmason]]
5155 <p>%C3%86var_Arnfj%C3%B6r%C3%B0_Bjarmason
5160 Magic Word: {{PAGENAMEE}} with metacharacters (bug 26781)
5162 title=[[*RFC 1234 http://example.com/]]
5166 <p>*RFC_1234_http://example.com/
5171 Magic Word: {{REVISIONID}}
5180 Magic Word: {{SCRIPTPATH}}
5189 Magic Word: {{SERVER}}
5193 <p><a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
5198 Magic Word: {{SERVERNAME}}
5207 Magic Word: {{SITENAME}}
5216 Case-sensitive magic words, when cased differently, should just be template transclusions
5223 <p><a href="/index.php?title=Template:CurrentMonth&action=edit&redlink=1" class="new" title="Template:CurrentMonth (page does not exist)">Template:CurrentMonth</a>
5224 <a href="/index.php?title=Template:Currentday&action=edit&redlink=1" class="new" title="Template:Currentday (page does not exist)">Template:Currentday</a>
5225 <a href="/index.php?title=Template:CURreNTweEK&action=edit&redlink=1" class="new" title="Template:CURreNTweEK (page does not exist)">Template:CURreNTweEK</a>
5226 <a href="/index.php?title=Template:CurrentHour&action=edit&redlink=1" class="new" title="Template:CurrentHour (page does not exist)">Template:CurrentHour</a>
5231 Case-insensitive magic words should still work with weird casing.
5241 <a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>
5246 Namespace 1 {{ns:1}}
5255 Namespace 1 {{ns:01}}
5264 Namespace 0 {{ns:0}} (bug 4783)
5272 Namespace 0 {{ns:00}} (bug 4783)
5280 Namespace -1 {{ns:-1}}
5289 Namespace User {{ns:User}}
5298 Namespace User talk {{ns:User_talk}}
5307 Namespace User talk {{ns:uSeR tAlK}}
5316 Namespace File {{ns:File}}
5325 Namespace File {{ns:Image}}
5334 Namespace (lang=de) Benutzer {{ns:User}}
5345 Namespace (lang=de) Benutzer Diskussion {{ns:3}}
5351 <p>Benutzer Diskussion
5359 {{urlencode:hi world?!}}
5360 {{urlencode:hi world?!|WIKI}}
5361 {{urlencode:hi world?!|PATH}}
5362 {{urlencode:hi world?!|QUERY}}
5375 Magic links: internal link to RFC (bug 479)
5379 <p><a href="/index.php?title=RFC_123&action=edit&redlink=1" class="new" title="RFC 123 (page does not exist)">RFC 123</a>
5384 Magic links: RFC (bug 479)
5388 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc822">RFC 822</a>
5393 Magic links: ISBN (bug 1937)
5397 <p><a href="/wiki/Special:BookSources/0306406152" class="internal mw-magiclink-isbn">ISBN 0-306-40615-2</a>
5402 Magic links: PMID incorrectly converts space to underscore
5406 <p><a class="external mw-magiclink-pmid" rel="nofollow" href="//www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a>
5415 Nonexistent template
5417 {{thistemplatedoesnotexist}}
5419 <p><a href="/index.php?title=Template:Thistemplatedoesnotexist&action=edit&redlink=1" class="new" title="Template:Thistemplatedoesnotexist (page does not exist)">Template:Thistemplatedoesnotexist</a>
5424 Template with invalid target containing tags
5426 {{a<b>b</b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5428 <p>{{a<b>b</b>|foo|a=b|a = b}}
5433 Template with invalid target containing unclosed tag
5435 {{a<b>|{{echo|foo}}|{{echo|a}}={{echo|b}}|a = b}}
5437 <p>{{a<b>|foo|a=b|a = b}}</b>
5444 This is a test template
5452 <p>This is a test template
5457 Template with explicit namespace
5461 <p>This is a test template
5469 This is a test template with parameter {{{param}}}
5475 {{paramtest|param=foo}}
5477 <p>This is a test template with parameter foo
5482 Template:paramtestnum
5488 Template unnamed parameter
5490 {{paramtestnum|Main Page|the main page}}
5492 <p><a href="/wiki/Main_Page" title="Main Page">the main page</a>
5497 Template:templatesimple
5503 Template:templateredirect
5505 #redirect [[Template:templatesimple]]
5509 Template:templateasargtestnum
5515 Template:templateasargtest
5517 {{template{{{templ}}}}}
5521 Template:templateasargtest2
5527 Template with template name as unnamed argument
5529 {{templateasargtestnum|templatesimple}}
5536 Template with template name as argument
5538 {{templateasargtest|templ=simple}}
5545 Template with template name as argument (2)
5547 {{templateasargtest2|templ=templatesimple}}
5554 Template:templateasargtestdefault
5556 {{{{{templ|templatesimple}}}}}
5566 Template with default value
5568 {{templateasargtestdefault}}
5575 Template with default value (value set)
5577 {{templateasargtestdefault|templ=templa}}
5586 {{templateredirect}}
5593 Template with argument in separate line
5595 {{ templateasargtest |
5603 Template with complex template as argument
5606 param ={{ templateasargtest |
5609 <p>This is a test template with parameter (test)
5614 Template with thumb image (with link in description)
5617 param =[[Image:noimage.png|thumb|[[no link|link]] [[no link|caption]]]]}}
5619 This is a test template with parameter <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Noimage.png" class="new" title="File:Noimage.png">File:Noimage.png</a> <div class="thumbcaption"><a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">link</a> <a href="/index.php?title=No_link&action=edit&redlink=1" class="new" title="No link (page does not exist)">caption</a></div></div></div>
5624 Template:complextemplate
5626 {{{1}}} {{paramtest|
5627 param ={{{param}}}}}
5631 Template with complex arguments
5634 param ={{ templateasargtest |
5635 templ = simple }}|[[Template:complextemplate|link]]}}
5637 <p><a href="/wiki/Template:Complextemplate" title="Template:Complextemplate">link</a> This is a test template with parameter (test)
5642 BUG 553: link with two variables in a piped link
5645 |[[{{{1}}}|{{{2}}}]]
5650 <td>[[{{{1}}}|{{{2}}}]]
5656 Magic variable as template parameter
5658 {{paramtest|param={{SITENAME}}}}
5660 <p>This is a test template with parameter MediaWiki
5667 [[{{{param}}}|link]]
5671 Template parameter as link source
5673 {{linktest|param=Main Page}}
5675 <p><a href="/wiki/Main_Page" title="Main Page">link</a>
5680 Template-generated attribute string (k='v')
5682 <span {{attr_str|id|v1}}>bar</span>
5684 <p><span id="v1">bar</span>
5691 including another template, {{paramtest|param={{{arg}}}}}
5695 Template passing argument to another template
5697 {{paramtest2|arg='hmm'}}
5699 <p>including another template, This is a test template with parameter 'hmm'
5710 Template as link source
5714 [[{{linktest2}}|Main Page]]
5716 [[{{linktest2}}]]Page
5718 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5719 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
5720 </p><p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>Page
5738 Template infinite loop
5742 <p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span>
5747 Template from main namespace
5766 BUG 529: Template with table, not included at beginning of line
5785 BUG 523: Template shouldn't eat newline (or add an extra one before table)
5805 BUG 41: Template parameters shown as broken links
5814 Template with targets containing wikilinks
5818 {{[[{{echo|foo}}]]}}
5820 {{{{echo|[[foo}}]]}}
5822 <p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
5823 </p><p>{{<a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">foo</a>}}
5831 ''None'' of '''this''' should be
5833 but rather passed unmodified
5837 # hmm, fix this or just deprecate msgnw and document its behavior?
5843 {{msgnw:MSGNW test}}
5845 <p>''None'' of '''this''' should be
5847 but rather passed unmodified
5855 {{int:youhavenewmessages|lots of money|not!}}
5857 <p>You have lots of money (not!).
5864 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
5868 <includeonly> and <noinclude> being included
5879 <onlyinclude>Foo</onlyinclude>bar
5883 <onlyinclude> being included
5895 <onlyinclude>Foo</onlyinclude>bar<includeonly>zar</includeonly>
5899 <onlyinclude> and <includeonly> being included
5908 <includeonly> and <noinclude> on a page
5910 Foo<noinclude>zar</noinclude><includeonly>bar</includeonly>
5917 Un-closed <noinclude>
5924 <onlyinclude> on a page
5926 <onlyinclude>Foo</onlyinclude>bar
5933 Un-closed <onlyinclude>
5940 Self-closed noinclude, includeonly, onlyinclude tags
5951 Unbalanced includeonly and noinclude tags
5955 |b</noinclude></noinclude>
5956 |c</noinclude></includeonly>
5957 |d</includeonly></includeonly>
5966 <td>c</includeonly>
5968 <td>d</includeonly></includeonly>
5974 Template:Includeonly section
5977 ==Includeonly section==
5983 Bug 6563: Edit link generation for section shown by <includeonly>
5985 {{includeonly section}}
5987 <h2><span class="mw-headline" id="Includeonly_section">Includeonly section</span> <span class="mw-editsection">[<a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-1" title="Template:Includeonly section">edit</a>]</span></h2>
5988 <h2><span class="mw-headline" id="Section_T-1">Section T-1</span> <span class="mw-editsection">[<a href="/index.php?title=Template:Includeonly_section&action=edit&section=T-2" title="Template:Includeonly section">edit</a>]</span></h2>
5992 # Uses same input as the contents of [[Template:Includeonly section]]
5994 Bug 6563: Section extraction for section shown by <includeonly>
5999 ==Includeonly section==
6007 Bug 6563: Edit link generation for section suppressed by <includeonly>
6010 ==Includeonly section==
6014 <h2><span class="mw-headline" id="Section_1">Section 1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a>]</span></h2>
6019 Bug 6563: Section extraction for section suppressed by <includeonly>
6024 ==Includeonly section==
6032 Un-closed <includeonly>
6039 ### <includeonly> and <noinclude> in attributes
6042 0. includeonly around the entire attribute
6044 <span <includeonly>id="v1"</includeonly><noinclude>id="v2"</noinclude>>bar</span>
6046 <p><span id="v2">bar</span>
6051 1. includeonly in html attr key
6053 <span <noinclude>id</noinclude><includeonly>about</includeonly>="foo">bar</span>
6055 <p><span id="foo">bar</span>
6060 2. includeonly in html attr value
6062 <span id="<noinclude>v1</noinclude><includeonly>v2</includeonly>">bar</span>
6063 <span id=<noinclude>"v1"</noinclude><includeonly>"v2"</includeonly>>bar</span>
6065 <p><span id="v1">bar</span>
6066 <span id="v1">bar</span>
6071 3. includeonly in part of an attr value
6073 <span style="color:<noinclude>red</noinclude><includeonly>blue</includeonly>;">bar</span>
6075 <p><span style="color:red;">bar</span>
6080 ### Testing parsing of templates where a template arg
6081 ### has the same name as the template itself.
6091 Templates: Template Name/Arg clash: 1. Use of positional param
6100 Templates: Template Name/Arg clash: 2. Use of named param
6109 Templates: Template Name/Arg clash: 3. Use of named param with empty input
6118 ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged
6122 Templates: 1. Simple use
6131 Templates: 2. Inside a block tag
6133 <div>{{echo|Foo}}</div>
6140 Templates: P-wrapping: 1a. Templates on consecutive lines
6151 Templates: P-wrapping: 1b. Templates on consecutive lines
6165 Templates: P-wrapping: 1c. Templates on consecutive lines
6168 {{echo|bar}} <div>baz</div>
6177 Templates: Inline Text: 1. Multiple tmeplate uses
6179 {{echo|Foo}}bar{{echo|baz}}
6186 Templates: Inline Text: 2. Back-to-back template uses
6188 {{echo|Foo}}{{echo|bar}}
6195 Templates: Block Tags: 1. Multiple template uses
6197 {{echo|<div>Foo</div>}}<div>bar</div>{{echo|<div>baz</div>}}
6199 <div>Foo</div><div>bar</div><div>baz</div>
6204 Templates: Block Tags: 2. Back-to-back template uses
6206 {{echo|<div>Foo</div>}}{{echo|<div>bar</div>}}
6208 <div>Foo</div><div>bar</div>
6213 Templates: Links: 1. Simple example
6215 {{echo|[[Foo|bar]]}}
6217 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6222 Templates: Links: 2. Generation of link href
6224 [[{{echo|Foo}}|bar]]
6226 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6231 Templates: Links: 3. Generation of part of a link href
6233 [[Fo{{echo|o}}|bar]]
6237 [[Foo{{echo|bar}}baz]]
6239 [[Foo{{echo|bar}}|bar]]
6241 [[:Foo{{echo|bar}}]]
6243 [[:Foo{{echo|bar}}|bar]]
6245 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6246 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6247 </p><p><a href="/index.php?title=Foobarbaz&action=edit&redlink=1" class="new" title="Foobarbaz (page does not exist)">Foobarbaz</a>
6248 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
6249 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6250 </p><p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">bar</a>
6255 Templates: Links: 4. Multiple templates generating link href
6257 [[{{echo|F}}{{echo|o}}ob{{echo|ar}}]]
6259 <p><a href="/index.php?title=Foobar&action=edit&redlink=1" class="new" title="Foobar (page does not exist)">Foobar</a>
6264 Templates: Links: 5. Generation of link text
6266 [[Foo|{{echo|bar}}]]
6268 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6273 Templates: Links: 5. Nested templates (only outermost template should be marked)
6275 {{echo|[[{{echo|Foo}}|bar]]}}
6277 <p><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">bar</a>
6282 Templates: HTML Tag: 1. Generation of HTML attr. key
6284 <div {{echo|style}}="color:red;">foo</div>
6286 <div style="color:red;">foo</div>
6291 Templates: HTML Tag: 2. Generation of HTML attr. value
6293 <div style={{echo|'color:red;'}}>foo</div>
6295 <div style="color:red;">foo</div>
6300 Templates: HTML Tag: 3. Generation of HTML attr key and value
6302 <div {{echo|style}}={{echo|'color:red;'}}>foo</div>
6304 <div style="color:red;">foo</div>
6309 Templates: HTML Tag: 4. Generation of starting piece of HTML attr value
6311 <div title="{{echo|This is a long title}} with just one piece templated">foo</div>
6313 <div title="This is a long title with just one piece templated">foo</div>
6318 Templates: HTML Tag: 5. Generation of middle piece of HTML attr value
6320 <div title="This is a long title with just {{echo|one piece}} templated">foo</div>
6322 <div title="This is a long title with just one piece templated">foo</div>
6327 Templates: HTML Tag: 6. Generation of end piece of HTML attr value
6329 <div title="This is a long title with just one piece {{echo|templated}}">foo</div>
6331 <div title="This is a long title with just one piece templated">foo</div>
6336 Templates: HTML Tag: 7. Generation of partial attribute key string
6338 <div st{{echo|yle}}="color:red;">foo</div>
6340 <div style="color:red;">foo</div>
6345 Templates: HTML Tables: 1. Generating start of a HTML table
6347 {{echo|<table><tr><td>foo</td>}}</tr></table>
6349 <table><tr><td>foo</td></tr></table>
6354 Templates: HTML Tables: 2a. Generating middle of a HTML table
6356 <table><tr>{{echo|<td>foo</td>}}</tr></table>
6358 <table><tr><td>foo</td></tr></table>
6363 Templates: HTML Tables: 2b. Generating middle of a HTML table
6365 <table>{{echo|<tr><td>foo</td></tr>}}</table>
6367 <table><tr><td>foo</td></tr></table>
6372 Templates: HTML Tables: 3. Generating end of a HTML table
6374 <table><tr>{{echo|<td>foo</td></tr></table>}}
6376 <table><tr><td>foo</td></tr></table>
6381 Templates: HTML Tables: 4a. Generating a single tag of a HTML table
6383 {{echo|<table>}}<tr><td>foo</td></tr></table>
6385 <table><tr><td>foo</td></tr></table>
6390 Templates: HTML Tables: 4b. Generating a single tag of a HTML table
6392 <table>{{echo|<tr>}}<td>foo</td></tr></table>
6394 <table><tr><td>foo</td></tr></table>
6399 Templates: HTML Tables: 4c. Generating a single tag of a HTML table
6401 <table><tr>{{echo|<td>}}foo</td></tr></table>
6403 <table><tr><td>foo</td></tr></table>
6408 Templates: HTML Tables: 4d. Generating a single tag of a HTML table
6410 <table><tr><td>foo{{echo|</td>}}</tr></table>
6412 <table><tr><td>foo</td></tr></table>
6417 Templates: HTML Tables: 4e. Generating a single tag of a HTML table
6419 <table><tr><td>foo</td>{{echo|</tr>}}</table>
6421 <table><tr><td>foo</td></tr></table>
6426 Templates: HTML Tables: 4f. Generating a single tag of a HTML table
6428 <table><tr><td>foo</td></tr>{{echo|</table>}}
6430 <table><tr><td>foo</td></tr></table>
6435 Templates: Wiki Tables: 1a. Fostering of entire template content
6443 <tr><td></td></tr></table>
6448 Templates: Wiki Tables: 1b. Fostering of entire template content
6461 <tr><td></td></tr></table>
6466 Templates: Wiki Tables: 2. Fostering of partial template content
6476 <tr><td></td></tr></table>
6481 Templates: Wiki Tables: 3. td-content via multiple templates
6484 {{echo|{{pipe}}a}}{{echo|b}}
6495 Templates: Wiki Tables: 4. Templated tags, no content
6501 <tr><td></td></tr></table>
6506 Templates: Wiki Tables: 5. Templated tags, regular td-tags
6520 Templates: Wiki Tables: 6. Templated tags, templated td-tags
6534 Templates: Lists: Multi-line list-items via templates
6536 *{{echo|a {{nonexistent|
6538 *{{echo|b {{nonexistent|
6541 <ul><li>a <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a>
6542 </li><li>b <a href="/index.php?title=Template:Nonexistent&action=edit&redlink=1" class="new" title="Template:Nonexistent (page does not exist)">Template:Nonexistent</a>
6548 Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo)
6550 {{echo|''a}}{{echo|b''c''d}}{{echo|''e}}
6552 <p><i>ab</i>c<i>d</i>e
6557 Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span)
6558 (PHP parser generates misnested html)
6562 {{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}}
6564 <p><span><i>a</i></span><i><span>b</span></i><span>c</span><i>d</i><span>e</span></p>
6568 Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div)
6569 (PHP parser generates misnested html)
6573 {{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}}
6576 <div><i>b</i>c<i>d</i></div>
6581 Templates: Ugly nesting: 4. Divs opened/closed across templates
6583 a<div>b{{echo|c</div>d}}e
6590 Templates: Ugly templates: 1. Navbox template parses badly leading to table misnesting
6596 |{{echo|foo</table>}}
6600 <table about="#mwt1" typeof="mw:Object/Template ">
6601 <tbody><tr><td>foo</td></tr></tbody></table><span about="#mwt1">
6602 bar</span><span about="#mwt1">
6607 Templates: Ugly templates: 2. Navbox template parses badly leading to table misnesting
6617 <td>1. {{echo|foo </table>}}</td>
6619 <td>2. {{echo|baz </table>}}</td>
6632 <table about="#mwt1" typeof="mw:Object/Template">
6637 <td >1. foo </td></tr></tbody></table></td>
6639 <td >2. baz </td></tr></tbody></table><span about="#mwt1">
6640 </span><span about="#mwt1">
6642 abc</span><span about="#mwt1">
6643 </span><span about="#mwt1">
6644 </span><span about="#mwt1">
6645 </span><span about="#mwt1">
6646 </span><span about="#mwt1">
6648 xyz</span><span about="#mwt1">
6649 </span><span about="#mwt1">
6654 Templates: Ugly templates: 3. newline-only template parameter
6663 # This looks like a bug: a single newline triggers p/br for some reason.
6665 Templates: Ugly templates: 4. newline-only template parameter inconsistency
6676 Parser Functions: 1. Simple example
6685 Parser Functions: 2. Nested use (only outermost should be marked up)
6694 ### Pre-save transform tests
6697 pre-save transform: subst:
6703 This is a test template
6707 pre-save transform: normal template
6717 pre-save transform: nonexistent template
6721 {{thistemplatedoesnotexist}}
6723 {{thistemplatedoesnotexist}}
6728 pre-save transform: subst magic variables
6737 # This is bug 89, which I fixed. -- wtm
6739 pre-save transform: subst: templates with parameters
6743 {{subst:paramtest|param="something else"}}
6745 This is a test template with parameter "something else"
6751 <nowiki>'''not wiki'''</nowiki>
6755 pre-save transform: nowiki in subst (bug 1188)
6759 {{subst:nowikitest}}
6761 <nowiki>'''not wiki'''</nowiki>
6766 Template:commenttest
6768 This template has <!-- a comment --> in it.
6772 pre-save transform: comment in subst (bug 1936)
6776 {{subst:commenttest}}
6778 This template has <!-- a comment --> in it.
6782 pre-save transform: unclosed tag
6786 <nowiki>'''not wiki'''
6788 <nowiki>'''not wiki'''
6792 pre-save transform: mixed tag case
6796 <NOwiki>'''not wiki'''</noWIKI>
6798 <NOwiki>'''not wiki'''</noWIKI>
6802 pre-save transform: unclosed comment in <nowiki>
6806 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
6808 wiki<nowiki>nowiki<!--nowiki</nowiki>wiki
6814 <span onmouseover="alert('crap')">Oh no</span>
6818 (confirming safety of fix for subst bug 1936)
6820 {{Template:dangerous}}
6822 <p><span>Oh no</span>
6827 pre-save transform: comment containing gallery (bug 5024)
6831 <!-- <gallery>data</gallery> -->
6833 <!-- <gallery>data</gallery> -->
6837 pre-save transform: comment containing extension
6841 <!-- <tag>data</tag> -->
6843 <!-- <tag>data</tag> -->
6847 pre-save transform: comment containing nowiki
6851 <!-- <nowiki>data</nowiki> -->
6853 <!-- <nowiki>data</nowiki> -->
6857 pre-save transform: <noinclude> in subst (bug 3298)
6867 pre-save transform: <onlyinclude> in subst (bug 3298)
6879 {{<includeonly>subst:</includeonly>Includes}}
6883 Template:SafeSubstTest
6885 {{<includeonly>safesubst:</includeonly>Includes}}
6889 bug 22297: safesubst: works during PST
6893 {{subst:SafeSubstTest}}{{safesubst:SubstTest}}
6899 bug 22297: safesubst: works during normal parse
6908 subst: does not work during normal parse
6912 <p>{{subst:Includes}}
6917 pre-save transform: context links ("pipe trick")
6921 [[Article (context)|]]
6924 [[Bar:Article (context)|]]
6925 [[:Bar:Article (context)|]]
6927 [[|Article (context)]]
6931 [[Article (context)|Article]]
6932 [[Bar:Article|Article]]
6933 [[:Bar:Article|Article]]
6934 [[Bar:Article (context)|Article]]
6935 [[:Bar:Article (context)|Article]]
6937 [[Article (context)]]
6938 [[Bar:X (Y) Z|X (Y) Z]]
6939 [[:Bar:X (Y) Z|X (Y) Z]]
6943 pre-save transform: context links ("pipe trick") with interwiki prefix
6947 [[interwiki:Article|]]
6948 [[:interwiki:Article|]]
6949 [[interwiki:Bar:Article|]]
6950 [[:interwiki:Bar:Article|]]
6952 [[interwiki:Article|Article]]
6953 [[:interwiki:Article|Article]]
6954 [[interwiki:Bar:Article|Bar:Article]]
6955 [[:interwiki:Bar:Article|Bar:Article]]
6959 pre-save transform: context links ("pipe trick") with parens in title
6961 pst title=[[Somearticle (context)]]
6965 [[Article (context)|Article]]
6969 pre-save transform: context links ("pipe trick") with comma in title
6971 pst title=[[Someplace, Somewhere]]
6974 [[Otherplace, Elsewhere|]]
6975 [[Otherplace, Elsewhere, Anywhere|]]
6977 [[Otherplace, Somewhere|Otherplace]]
6978 [[Otherplace, Elsewhere|Otherplace]]
6979 [[Otherplace, Elsewhere, Anywhere|Otherplace]]
6983 pre-save transform: context links ("pipe trick") with parens and comma
6985 pst title=[[Someplace (IGNORED), Somewhere]]
6988 [[Otherplace (place), Elsewhere|]]
6990 [[Otherplace, Somewhere|Otherplace]]
6991 [[Otherplace (place), Elsewhere|Otherplace]]
6995 pre-save transform: context links ("pipe trick") with comma and parens
6997 pst title=[[Who, me? (context)]]
7000 [[Me, Myself, and I (1937 song)|]]
7002 [[Yes, you. (context)|Yes, you.]]
7003 [[Me, Myself, and I (1937 song)|Me, Myself, and I]]
7007 pre-save transform: context links ("pipe trick") with namespace
7009 pst title=[[Ns:Somearticle]]
7013 [[Ns:Article|Article]]
7017 pre-save transform: context links ("pipe trick") with namespace and parens
7019 pst title=[[Ns:Somearticle (context)]]
7023 [[Ns:Article (context)|Article]]
7027 pre-save transform: context links ("pipe trick") with namespace and comma
7029 pst title=[[Ns:Somearticle, Context, Whatever]]
7033 [[Ns:Article, Context, Whatever|Article]]
7037 pre-save transform: context links ("pipe trick") with namespace, comma and parens
7039 pst title=[[Ns:Somearticle, Context (context)]]
7043 [[Ns:Article (context)|Article]]
7047 pre-save transform: context links ("pipe trick") with namespace, parens and comma
7049 pst title=[[Ns:Somearticle (IGNORED), Context]]
7053 [[Ns:Article, Context|Article]]
7057 pre-save transform: context links ("pipe trick") with full-width parens and no space (Japanese and Chinese style, bug 30149)
7061 [[Article(context)|]]
7062 [[Bar:Article(context)|]]
7063 [[:Bar:Article(context)|]]
7064 [[|Article(context)]]
7068 [[Article(context)|Article]]
7069 [[Bar:Article(context)|Article]]
7070 [[:Bar:Article(context)|Article]]
7071 [[Article(context)]]
7073 [[:Bar:X(Y)Z|X(Y)Z]]
7077 pre-save transform: context links ("pipe trick") with full-width parens and space (Japanese and Chinese style, bug 30149)
7081 [[Article (context)|]]
7082 [[Bar:Article (context)|]]
7083 [[:Bar:Article (context)|]]
7084 [[|Article (context)]]
7088 [[Article (context)|Article]]
7089 [[Bar:Article (context)|Article]]
7090 [[:Bar:Article (context)|Article]]
7091 [[Article (context)]]
7092 [[Bar:X (Y) Z|X (Y) Z]]
7093 [[:Bar:X (Y) Z|X (Y) Z]]
7097 pre-save transform: context links ("pipe trick") with parens and no space (Korean style, bug 30149)
7101 [[Article(context)|]]
7102 [[Bar:Article(context)|]]
7103 [[:Bar:Article(context)|]]
7104 [[|Article(context)]]
7108 [[Article(context)|Article]]
7109 [[Bar:Article(context)|Article]]
7110 [[:Bar:Article(context)|Article]]
7111 [[Article(context)]]
7113 [[:Bar:X(Y)Z|X(Y)Z]]
7117 pre-save transform: context links ("pipe trick") with commas (bug 21660)
7121 [[Article (context), context|]]
7122 [[Article (context),context|]]
7123 [[Bar:Article (context), context|]]
7124 [[Bar:Article (context),context|]]
7125 [[:Bar:Article (context), context|]]
7126 [[:Bar:Article (context),context|]]
7128 [[Article (context), context|Article]]
7129 [[Article (context),context|Article]]
7130 [[Bar:Article (context), context|Article]]
7131 [[Bar:Article (context),context|Article]]
7132 [[:Bar:Article (context), context|Article]]
7133 [[:Bar:Article (context),context|Article]]
7137 pre-save transform: trim trailing empty lines
7141 Empty lines are trimmed
7147 Empty lines are trimmed
7151 pre-save transform: Signature expansion
7156 * <noinclude>~~~</noinclude>
7157 * <includeonly>~~~</includeonly>
7158 * <onlyinclude>~~~</onlyinclude>
7160 * [[Special:Contributions/127.0.0.1|127.0.0.1]]
7161 * <noinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</noinclude>
7162 * <includeonly>[[Special:Contributions/127.0.0.1|127.0.0.1]]</includeonly>
7163 * <onlyinclude>[[Special:Contributions/127.0.0.1|127.0.0.1]]</onlyinclude>
7168 pre-save transform: Signature expansion in nowiki tags (bug 93)
7174 <nowiki>~~~~</nowiki>
7176 <includeonly><nowiki>~~~~</nowiki></includeonly>
7178 <noinclude><nowiki>~~~~</nowiki></noinclude>
7180 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
7182 {{subst:Foo}} shall be converted to FOO
7184 As well as inside noinclude/onlyinclude
7185 <noinclude>{{subst:Foo}}</noinclude>
7186 <onlyinclude>{{subst:Foo}}</onlyinclude>
7188 But not inside includeonly
7189 <includeonly>{{subst:Foo}}</includeonly>
7193 <nowiki>~~~~</nowiki>
7195 <includeonly><nowiki>~~~~</nowiki></includeonly>
7197 <noinclude><nowiki>~~~~</nowiki></noinclude>
7199 <onlyinclude><nowiki>~~~~</nowiki></onlyinclude>
7201 FOO shall be converted to FOO
7203 As well as inside noinclude/onlyinclude
7204 <noinclude>FOO</noinclude>
7205 <onlyinclude>FOO</onlyinclude>
7207 But not inside includeonly
7208 <includeonly>{{subst:Foo}}</includeonly>
7212 ### Message transform tests
7215 message transform: magic variables
7225 message transform: should not transform wiki markup
7235 message transform: <noinclude> in transcluded template (bug 4926)
7245 message transform: <onlyinclude> in transcluded template (bug 4926)
7255 {{#special:}} page name, known
7259 {{#special:Recentchanges}}
7261 Special:RecentChanges
7265 {{#special:}} page name with subpage, known
7269 {{#special:Recentchanges/param}}
7271 Special:RecentChanges/param
7275 {{#special:}} page name, unknown
7279 {{#special:foobarnonexistent}}
7281 No such special page
7285 {{#speciale:}} page name, known
7289 {{#speciale:Recentchanges}}
7291 Special:RecentChanges
7295 {{#speciale:}} page name with subpage, known
7299 {{#speciale:Recentchanges/param}}
7301 Special:RecentChanges/param
7305 {{#speciale:}} page name, unknown
7309 {{#speciale:foobarnonexistent}}
7311 No_such_special_page
7320 [[Image:foobar.jpg]]
7322 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7329 [[Image:foobar.jpg|right]]
7331 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7336 Simple image (using File: namespace, now canonical)
7340 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7347 [[Image:foobar.jpg|right|Caption text]]
7349 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7354 Image with empty attribute
7356 [[Image:foobar.jpg|right||Caption text]]
7358 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7363 Image with link tails
7365 123[[Image:foobar.jpg]]456
7366 123[[Image:foobar.jpg|right]]456
7367 123[[Image:foobar.jpg|thumb]]456
7369 <p>123<a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>456
7371 123<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>456
7372 123<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div></div></div></div>456
7377 Image with multiple captions -- only last one is accepted
7379 [[Image:foobar.jpg|right|Caption1 - ignored|[[Caption2]] - ignored|Caption3 - accepted]]
7381 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption3 - accepted"><img alt="Caption3 - accepted" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7386 Image with width attribute at different positions
7388 [[Image:foobar.jpg|200px|right|Caption]]
7389 [[Image:foobar.jpg|right|200px|Caption]]
7390 [[Image:foobar.jpg|right|Caption|200px]]
7392 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
7393 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
7394 <div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption"><img alt="Caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a></div>
7399 Image with link parameter, wiki target
7401 [[Image:foobar.jpg|link=Target page]]
7403 <p><a href="/wiki/Target_page" title="Target page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7408 Image with link parameter, URL target
7410 [[Image:foobar.jpg|link=http://example.com/]]
7412 <p><a href="http://example.com/" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7417 Image with link parameter, wgExternalLinkTarget
7419 [[Image:foobar.jpg|link=http://example.com/]]
7421 wgExternalLinkTarget='foobar'
7423 <p><a href="http://example.com/" target="foobar" rel="nofollow"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7428 Image with link parameter, wgNoFollowLinks set to false
7430 [[Image:foobar.jpg|link=http://example.com/]]
7432 wgNoFollowLinks=false
7434 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7439 Image with link parameter, wgNoFollowDomainExceptions
7441 [[Image:foobar.jpg|link=http://example.com/]]
7443 wgNoFollowDomainExceptions='example.com'
7445 <p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7450 Image with link parameter, wgExternalLinkTarget, unnamed parameter
7452 [[Image:foobar.jpg|link=http://example.com/|Title]]
7454 wgExternalLinkTarget='foobar'
7456 <p><a href="http://example.com/" title="Title" target="foobar" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7461 Image with empty link parameter
7463 [[Image:foobar.jpg|link=]]
7465 <p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" />
7470 Image with link parameter (wiki target) and unnamed parameter
7472 [[Image:foobar.jpg|link=Target page|Title]]
7474 <p><a href="/wiki/Target_page" title="Title"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7479 Image with link parameter (URL target) and unnamed parameter
7481 [[Image:foobar.jpg|link=http://example.com/|Title]]
7483 <p><a href="http://example.com/" title="Title" rel="nofollow"><img alt="Title" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7488 Thumbnail image with link parameter
7492 [[Image:foobar.jpg|thumb|link=http://example.com/|Title]]
7494 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="http://example.com/"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7499 Manually-specified thumbnail image
7503 [[Image:Foobar.jpg|thumb=Thumb.png|Title]]
7505 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/File:Foobar.jpg"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7510 Manually-specified thumbnail image with explicit link to wiki page
7514 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|Title]]
7516 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7521 Manually-specified thumbnail image with explicit link to url
7525 [[Image:Foobar.jpg|thumb=Thumb.png|link=http://example.com|Title]]
7527 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="http://example.com"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7532 Manually-specified thumbnail image with explicit no link
7536 [[Image:Foobar.jpg|thumb=Thumb.png|link=|Title]]
7538 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><img alt="" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7543 Manually-specified thumbnail image with explicit link and alt text
7547 [[Image:Foobar.jpg|thumb=Thumb.png|link=Main Page|alt=alttext|Title]]
7549 <div class="thumb tright"><div class="thumbinner" style="width:137px;"><a href="/wiki/Main_Page" title="Main Page"><img alt="alttext" src="http://example.com/images/e/ea/Thumb.png" width="135" height="135" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Title</div></div></div>
7554 Image with frame and link
7556 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]]
7558 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
7563 Image with frame and link and explicit alt
7565 [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]]
7567 <div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div>
7572 Image with wiki markup in implicit alt
7574 [[Image:Foobar.jpg|testing '''bold''' in alt]]
7576 <p><a href="/wiki/File:Foobar.jpg" class="image" title="testing bold in alt"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7581 Image with wiki markup in explicit alt
7583 [[Image:Foobar.jpg|alt=testing '''bold''' in alt]]
7585 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7590 Link to image page- image page normally doesn't exists, hence edit link
7591 Add test with existing image page
7592 #<p><a href="/wiki/File:Test" title="Image:Test">Image:test</a>
7596 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">Image:test</a>
7601 bug 18784 Link to non-existent image page with caption should use caption as link text
7603 [[:Image:test|caption]]
7605 <p><a href="/index.php?title=File:Test&action=edit&redlink=1" class="new" title="File:Test (page does not exist)">caption</a>
7610 Frameless image caption with a free URL
7612 [[Image:foobar.jpg|http://example.com]]
7614 <p><a href="/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="http://example.com" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7619 Thumbnail image caption with a free URL
7621 [[Image:foobar.jpg|thumb|http://example.com]]
7623 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
7628 Thumbnail image caption with a free URL and explicit alt
7630 [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]]
7632 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a></div></div></div>
7637 BUG 1887: A ISBN with a thumbnail
7639 [[Image:foobar.jpg|thumb|ISBN 1235467890]]
7641 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="/wiki/Special:BookSources/1235467890" class="internal mw-magiclink-isbn">ISBN 1235467890</a></div></div></div>
7646 BUG 1887: A RFC with a thumbnail
7648 [[Image:foobar.jpg|thumb|This is RFC 12354]]
7650 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div>
7655 BUG 1887: A mailto link with a thumbnail
7657 [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]]
7659 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Please <a rel="nofollow" class="external free" href="mailto:nobody@example.com">mailto:nobody@example.com</a></div></div></div>
7663 # Pending resolution to bug 368
7665 BUG 648: Frameless image caption with a link
7667 [[Image:foobar.jpg|text with a [[link]] in it]]
7669 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7674 BUG 648: Frameless image caption with a link (suffix)
7676 [[Image:foobar.jpg|text with a [[link]]foo in it]]
7678 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a linkfoo in it"><img alt="text with a linkfoo in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7683 BUG 648: Frameless image caption with an interwiki link
7685 [[Image:foobar.jpg|text with a [[MeatBall:Link]] in it]]
7687 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a MeatBall:Link in it"><img alt="text with a MeatBall:Link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7692 BUG 648: Frameless image caption with a piped interwiki link
7694 [[Image:foobar.jpg|text with a [[MeatBall:Link|link]] in it]]
7696 <p><a href="/wiki/File:Foobar.jpg" class="image" title="text with a link in it"><img alt="text with a link in it" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7701 Escape HTML special chars in image alt text
7703 [[Image:foobar.jpg|& < > "]]
7705 <p><a href="/wiki/File:Foobar.jpg" class="image" title="& < > ""><img alt="& < > "" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7710 BUG 499: Alt text should have Ӓ, not &1234;
7712 [[Image:foobar.jpg|♀]]
7714 <p><a href="/wiki/File:Foobar.jpg" class="image" title="♀"><img alt="♀" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7719 Broken image caption with link
7721 [[Image:Foobar.jpg|thumb|This is a broken caption. But [[Main Page|this]] is just an ordinary link.
7723 <p>[[Image:Foobar.jpg|thumb|This is a broken caption. But <a href="/wiki/Main_Page" title="Main Page">this</a> is just an ordinary link.
7728 Image caption containing another image
7730 [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]]
7732 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is a caption with another <a href="/index.php?title=Special:Upload&wpDestFile=Icon.png" class="new" title="File:Icon.png">image</a> inside it!</div></div></div>
7737 Image caption containing a newline
7739 [[Image:Foobar.jpg|This
7742 <p><a href="/wiki/File:Foobar.jpg" class="image" title="This *is some text"><img alt="This *is some text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
7747 Parsoid: Image caption containing leading space
7748 (The leading space should not trigger nowiki escaping in wt2wt mode)
7750 [[Image:Foobar.jpg|thumb| bar]]
7752 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>bar</div></div></div>
7757 Bug 3090: External links other than http: in image captions
7759 [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]]
7761 <div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/300px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/400px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This caption has <a rel="nofollow" class="external text" href="irc://example.net">irc</a> and <a rel="nofollow" class="external text" href="https://example.com">Secure</a> ext links in it.</div></div></div>
7768 [[Image:foobar.jpg|a|class=b]]
7770 <p><a href="/wiki/File:Foobar.jpg" class="image" title="a"><img alt="a" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="b" /></a>
7775 Localized image handling (1).
7779 [[Archivo:Foobar.jpg|izquierda|enlace=foo|caption]]
7781 <div class="floatleft"><a href="/wiki/Foo" title="caption"><img alt="caption" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
7786 Localized image handling (2).
7790 [[Archivo:Foobar.jpg|miniatura|izquierda|enlace=foo|caption]]
7792 <div class="thumb tleft"><div class="thumbinner" style="width:182px;"><a href="/wiki/Foo" title="Foo"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/Archivo:Foobar.jpg" class="internal" title="Aumentar"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>caption</div></div></div>
7797 "border", "frameless" and "class" attributes on an image.
7799 [[File:Foobar.jpg|frameless|border|class=extra|caption]]
7801 <p><a href="/wiki/File:Foobar.jpg" class="image" title="caption"><img alt="caption" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="extra thumbborder" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a>
7808 #REDIRECT [[File:Barfoo.jpg]]
7814 [[Image:Barfoo.jpg]]
7816 <p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
7821 Missing image with uploads disabled
7825 [[Image:Foobaz.jpg]]
7827 <p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a>
7836 Subpage test/subpage
7844 subpage title=[[Subpage test]]
7848 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a>
7853 Subpage noslash link
7855 subpage title=[[Subpage test]]
7859 <p><a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">subpage</a>
7868 <p><a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a>
7873 BUG 561: {{/Subpage}}
7875 subpage title=[[Page]]
7879 <p><a href="/index.php?title=Page/Subpage&action=edit&redlink=1" class="new" title="Page/Subpage (page does not exist)">Page/Subpage</a>
7887 Category:MediaWiki User's Guide
7895 [[:Category:MediaWiki User's Guide]]
7897 <p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a>
7906 [[Category:MediaWiki User's Guide]]
7908 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
7912 PAGESINCATEGORY invalid title fatal (r33546 fix)
7914 {{PAGESINCATEGORY:<bogus>}}
7921 Category with different sort key
7925 [[Category:MediaWiki User's Guide|Foo]]
7927 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
7931 Category with identical sort key
7935 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
7937 <a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">MediaWiki User's Guide</a>
7941 Category with empty sort key
7946 [[Category:MediaWiki User's Guide|]]
7948 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
7952 Category with empty sort key and parentheses
7957 [[Category:Foo (bar)|]]
7959 [[Category:Foo (bar)|Foo]]
7963 Category with link tail
7968 123[[Category:Foo]]456
7970 123[[Category:Foo]]456
7974 Category with template
7979 [[Category:{{echo|Foo}}]]
7981 [[Category:{{echo|Foo}}]]
7985 Category with template in sort key
7990 [[Category:Foo|{{echo|Bar}}]]
7992 [[Category:Foo|{{echo|Bar}}]]
7996 Category with template in sort key and title
8001 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
8003 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
8007 Category / paragraph interactions
8009 Foo [[Category:Baz]] Bar
8011 Foo [[Category:Baz]]
8019 [[Category:Baz]] Bar
8032 {{echo|[[Category:Baz]]}}
8047 ### Inter-language links
8050 Inter-language links
8056 [[zh:食品]]
8058 es:Alimento fr:Nourriture zh:食品
8062 Duplicate interlanguage links (bug 24502)
8078 Basic section headings
8085 ===Smaller headline===
8088 <h2><span class="mw-headline" id="Headline_1">Headline 1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span></h2>
8091 <h2><span class="mw-headline" id="Headline_2">Headline 2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</span></h2>
8094 <h3><span class="mw-headline" id="Smaller_headline">Smaller headline</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</span></h3>
8100 Section headings with TOC
8103 === Subheadline 1 ===
8104 ===== Skipping a level =====
8105 ====== Skipping a level ======
8109 ===Another headline===
8111 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8113 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
8115 <li class="toclevel-2 tocsection-2"><a href="#Subheadline_1"><span class="tocnumber">1.1</span> <span class="toctext">Subheadline 1</span></a>
8117 <li class="toclevel-3 tocsection-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a>
8119 <li class="toclevel-4 tocsection-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li>
8126 <li class="toclevel-1 tocsection-5"><a href="#Headline_2"><span class="tocnumber">2</span> <span class="toctext">Headline 2</span></a>
8128 <li class="toclevel-2 tocsection-6"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li>
8133 <h2><span class="mw-headline" id="Headline_1">Headline 1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span></h2>
8134 <h3><span class="mw-headline" id="Subheadline_1">Subheadline 1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</span></h3>
8135 <h5><span class="mw-headline" id="Skipping_a_level">Skipping a level</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</span></h5>
8136 <h6><span class="mw-headline" id="Skipping_a_level_2">Skipping a level</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</span></h6>
8137 <h2><span class="mw-headline" id="Headline_2">Headline 2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</span></h2>
8140 <h3><span class="mw-headline" id="Another_headline">Another headline</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a>]</span></h3>
8144 # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10'
8146 Handling of sections up to level 6 and beyond
8149 == Level 2 Heading==
8150 === Level 3 Heading===
8151 ==== Level 4 Heading====
8152 ===== Level 5 Heading=====
8153 ====== Level 6 Heading======
8154 ======= Level 7 Heading=======
8155 ======== Level 8 Heading========
8156 ========= Level 9 Heading=========
8157 ========== Level 10 Heading==========
8159 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8161 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
8163 <li class="toclevel-2 tocsection-2"><a href="#Level_2_Heading"><span class="tocnumber">1.1</span> <span class="toctext">Level 2 Heading</span></a>
8165 <li class="toclevel-3 tocsection-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a>
8167 <li class="toclevel-4 tocsection-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a>
8169 <li class="toclevel-5 tocsection-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a>
8171 <li class="toclevel-6 tocsection-6"><a href="#Level_6_Heading"><span class="tocnumber">1.1.1.1.1.1</span> <span class="toctext">Level 6 Heading</span></a></li>
8172 <li class="toclevel-6 tocsection-7"><a href="#.3D_Level_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">= Level 7 Heading=</span></a></li>
8173 <li class="toclevel-6 tocsection-8"><a href="#.3D.3D_Level_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">== Level 8 Heading==</span></a></li>
8174 <li class="toclevel-6 tocsection-9"><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">=== Level 9 Heading===</span></a></li>
8175 <li class="toclevel-6 tocsection-10"><a href="#.3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.5</span> <span class="toctext">==== Level 10 Heading====</span></a></li>
8188 <h1><span class="mw-headline" id="Level_1_Heading">Level 1 Heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</span></h1>
8189 <h2><span class="mw-headline" id="Level_2_Heading">Level 2 Heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</span></h2>
8190 <h3><span class="mw-headline" id="Level_3_Heading">Level 3 Heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</span></h3>
8191 <h4><span class="mw-headline" id="Level_4_Heading">Level 4 Heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</span></h4>
8192 <h5><span class="mw-headline" id="Level_5_Heading">Level 5 Heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</span></h5>
8193 <h6><span class="mw-headline" id="Level_6_Heading">Level 6 Heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</span></h6>
8194 <h6><span class="mw-headline" id=".3D_Level_7_Heading.3D">= Level 7 Heading=</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</span></h6>
8195 <h6><span class="mw-headline" id=".3D.3D_Level_8_Heading.3D.3D">== Level 8 Heading==</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</span></h6>
8196 <h6><span class="mw-headline" id=".3D.3D.3D_Level_9_Heading.3D.3D.3D">=== Level 9 Heading===</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</span></h6>
8197 <h6><span class="mw-headline" id=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D">==== Level 10 Heading====</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</span></h6>
8202 TOC regression (bug 9764)
8206 ==== title 1.1.1 ====
8211 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8213 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
8215 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a>
8217 <li class="toclevel-3 tocsection-3"><a href="#title_1.1.1"><span class="tocnumber">1.1.1</span> <span class="toctext">title 1.1.1</span></a></li>
8220 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
8223 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
8225 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
8230 <h2><span class="mw-headline" id="title_1">title 1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span></h2>
8231 <h3><span class="mw-headline" id="title_1.1">title 1.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span></h3>
8232 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a>]</span></h4>
8233 <h3><span class="mw-headline" id="title_1.2">title 1.2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a>]</span></h3>
8234 <h2><span class="mw-headline" id="title_2">title 2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a>]</span></h2>
8235 <h3><span class="mw-headline" id="title_2.1">title 2.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a>]</span></h3>
8240 TOC with wgMaxTocLevel=3 (bug 6204)
8246 ==== title 1.1.1 ====
8251 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8253 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
8255 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
8256 <li class="toclevel-2 tocsection-4"><a href="#title_1.2"><span class="tocnumber">1.2</span> <span class="toctext">title 1.2</span></a></li>
8259 <li class="toclevel-1 tocsection-5"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a>
8261 <li class="toclevel-2 tocsection-6"><a href="#title_2.1"><span class="tocnumber">2.1</span> <span class="toctext">title 2.1</span></a></li>
8266 <h2><span class="mw-headline" id="title_1">title 1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span></h2>
8267 <h3><span class="mw-headline" id="title_1.1">title 1.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span></h3>
8268 <h4><span class="mw-headline" id="title_1.1.1">title 1.1.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 1.1.1">edit</a>]</span></h4>
8269 <h3><span class="mw-headline" id="title_1.2">title 1.2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: title 1.2">edit</a>]</span></h3>
8270 <h2><span class="mw-headline" id="title_2">title 2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: title 2">edit</a>]</span></h2>
8271 <h3><span class="mw-headline" id="title_2.1">title 2.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: title 2.1">edit</a>]</span></h3>
8276 TOC with wgMaxTocLevel=3 and two level four headings (bug 6204)
8282 ====Section 1.1.1====
8283 ====Section 1.1.1.1====
8286 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8288 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
8290 <li class="toclevel-2 tocsection-2"><a href="#Section_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Section 1.1</span></a></li>
8293 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
8296 <h2><span class="mw-headline" id="Section_1">Section 1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 1">edit</a>]</span></h2>
8297 <h3><span class="mw-headline" id="Section_1.1">Section 1.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 1.1">edit</a>]</span></h3>
8298 <h4><span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Section 1.1.1">edit</a>]</span></h4>
8299 <h4><span class="mw-headline" id="Section_1.1.1.1">Section 1.1.1.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Section 1.1.1.1">edit</a>]</span></h4>
8300 <h2><span class="mw-headline" id="Section_2">Section 2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Section 2">edit</a>]</span></h2>
8306 Resolving duplicate section names
8311 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span></h2>
8312 <h2><span class="mw-headline" id="Foo_bar_2">Foo bar</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</span></h2>
8317 Resolving duplicate section names with differing case (bug 10721)
8322 <h2><span class="mw-headline" id="Foo_bar">Foo bar</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span></h2>
8323 <h2><span class="mw-headline" id="Foo_Bar_2">Foo Bar</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a>]</span></h2>
8335 Template with sections, __NOTOC__
8342 <h2><span class="mw-headline" id="Section_0">Section 0</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a>]</span></h2>
8343 <h3><span class="mw-headline" id="Section_1">Section 1</span> <span class="mw-editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=T-1" title="Template:Sections">edit</a>]</span></h3>
8344 <h2><span class="mw-headline" id="Section_2">Section 2</span> <span class="mw-editsection">[<a href="/index.php?title=Template:Sections&action=edit&section=T-2" title="Template:Sections">edit</a>]</span></h2>
8345 <h2><span class="mw-headline" id="Section_4">Section 4</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a>]</span></h2>
8350 __NOEDITSECTION__ keyword
8356 <h2><span class="mw-headline" id="Section_1">Section 1</span> </h2>
8357 <h2><span class="mw-headline" id="Section_2">Section 2</span> </h2>
8362 Link inside a section heading
8364 ==Section with a [[Main Page|link]] in it==
8366 <h2><span class="mw-headline" id="Section_with_a_link_in_it">Section with a <a href="/wiki/Main_Page" title="Main Page">link</a> in it</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</span></h2>
8371 TOC regression (bug 12077)
8378 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8380 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
8382 <li class="toclevel-2 tocsection-2"><a href="#title_1.1"><span class="tocnumber">1.1</span> <span class="toctext">title 1.1</span></a></li>
8385 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
8388 <h2><span class="mw-headline" id="title_1">title 1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: title 1">edit</a>]</span></h2>
8389 <h3><span class="mw-headline" id="title_1.1">title 1.1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: title 1.1">edit</a>]</span></h3>
8390 <h2><span class="mw-headline" id="title_2">title 2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: title 2">edit</a>]</span></h2>
8395 BUG 1219 URL next to image (good)
8397 http://example.com [[Image:foobar.jpg]]
8399 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8404 Short headings with trailing space should match behavior of Parser::doHeadings (bug 19910)
8407 The line above must have a trailing space!
8410 But just in case it doesn't...
8412 <h1><span class="mw-headline" id=".3D">=</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: =">edit</a>]</span></h1>
8413 <p>The line above must have a trailing space!
8415 <h1><span class="mw-headline" id=".3D_2">=</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =">edit</a>]</span></h1>
8416 <p>But just in case it doesn't...
8421 Header with special characters (bug 25462)
8423 The tooltips shall not show entities to the user (ie. be double escaped)
8440 <p>The tooltips shall not show entities to the user (ie. be double escaped)
8442 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8444 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text > text</span></a></li>
8445 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text < text</span></a></li>
8446 <li class="toclevel-1 tocsection-3"><a href="#text_.26_text"><span class="tocnumber">3</span> <span class="toctext">text & text</span></a></li>
8447 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
8448 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
8451 <h2><span class="mw-headline" id="text_.3E_text">text > text</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: text > text">edit</a>]</span></h2>
8454 <h2><span class="mw-headline" id="text_.3C_text">text < text</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: text < text">edit</a>]</span></h2>
8457 <h2><span class="mw-headline" id="text_.26_text">text & text</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: text & text">edit</a>]</span></h2>
8460 <h2><span class="mw-headline" id="text_.27_text">text ' text</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: text ' text">edit</a>]</span></h2>
8463 <h2><span class="mw-headline" id="text_.22_text">text " text</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: text " text">edit</a>]</span></h2>
8469 Headers with excess '=' characters
8470 (Are similar tests necessary beyond the 1st level?)
8474 =''italic'' heading==
8475 ==''italic'' heading=
8477 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8479 <li class="toclevel-1 tocsection-1"><a href="#foo.3D"><span class="tocnumber">1</span> <span class="toctext">foo=</span></a></li>
8480 <li class="toclevel-1 tocsection-2"><a href="#.3Dfoo"><span class="tocnumber">2</span> <span class="toctext">=foo</span></a></li>
8481 <li class="toclevel-1 tocsection-3"><a href="#italic_heading.3D"><span class="tocnumber">3</span> <span class="toctext"><i>italic</i> heading=</span></a></li>
8482 <li class="toclevel-1 tocsection-4"><a href="#.3Ditalic_heading"><span class="tocnumber">4</span> <span class="toctext">=<i>italic</i> heading</span></a></li>
8485 <h1><span class="mw-headline" id="foo.3D">foo=</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: foo=">edit</a>]</span></h1>
8486 <h1><span class="mw-headline" id=".3Dfoo">=foo</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: =foo">edit</a>]</span></h1>
8487 <h1><span class="mw-headline" id="italic_heading.3D"><i>italic</i> heading=</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: italic heading=">edit</a>]</span></h1>
8488 <h1><span class="mw-headline" id=".3Ditalic_heading">=<i>italic</i> heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: =italic heading">edit</a>]</span></h1>
8493 HTML headers vs TOC (bug 23393)
8494 (__NOEDITSECTION__ for clearer output, doesn't matter here)
8506 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
8508 <li class="toclevel-1"><a href="#Header_1"><span class="tocnumber">1</span> <span class="toctext">Header 1</span></a>
8510 <li class="toclevel-2 tocsection-1"><a href="#Header_1.1"><span class="tocnumber">1.1</span> <span class="toctext">Header 1.1</span></a></li>
8511 <li class="toclevel-2 tocsection-2"><a href="#Header_1.2"><span class="tocnumber">1.2</span> <span class="toctext">Header 1.2</span></a></li>
8514 <li class="toclevel-1"><a href="#Header_2"><span class="tocnumber">2</span> <span class="toctext">Header 2</span></a>
8516 <li class="toclevel-2 tocsection-3"><a href="#Header_2.1"><span class="tocnumber">2.1</span> <span class="toctext">Header 2.1</span></a></li>
8517 <li class="toclevel-2 tocsection-4"><a href="#Header_2.2"><span class="tocnumber">2.2</span> <span class="toctext">Header 2.2</span></a></li>
8522 <h1><span class="mw-headline" id="Header_1">Header 1</span> </h1>
8523 <h2><span class="mw-headline" id="Header_1.1">Header 1.1</span> </h2>
8524 <h2><span class="mw-headline" id="Header_1.2">Header 1.2</span> </h2>
8525 <h1><span class="mw-headline" id="Header_2">Header 2</span> </h1>
8526 <h2><span class="mw-headline" id="Header_2.1">Header 2.1</span> </h2>
8527 <h2><span class="mw-headline" id="Header_2.2">Header 2.2</span> </h2>
8532 BUG 1219 URL next to image (broken)
8534 http://example.com[[Image:foobar.jpg]]
8536 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a>
8541 Bug 1186 news: in the middle of text
8543 http://en.wikinews.org/wiki/Wikinews:Workplace
8545 <p><a rel="nofollow" class="external free" href="http://en.wikinews.org/wiki/Wikinews:Workplace">http://en.wikinews.org/wiki/Wikinews:Workplace</a>
8551 Namespaced link must have a title
8560 Namespaced link must have a title (bad fragment version)
8562 [[Project:#fragment]]
8564 <p>[[Project:#fragment]]
8570 ### HTML tags and HTML attributes
8574 div with no attributes
8576 <div>HTML rocks</div>
8578 <div>HTML rocks</div>
8583 div with double-quoted attribute
8585 <div id="rock">HTML rocks</div>
8587 <div id="rock">HTML rocks</div>
8592 div with single-quoted attribute
8594 <div id='rock'>HTML rocks</div>
8596 <div id="rock">HTML rocks</div>
8601 div with unquoted attribute
8603 <div id=rock>HTML rocks</div>
8605 <div id="rock">HTML rocks</div>
8610 div with illegal double attributes
8612 <div id="a" id="b">HTML rocks</div>
8614 <div id="b">HTML rocks</div>
8618 # FIXME: produce empty string instead of "class" in the PHP parser, following
8621 div with empty attribute value, space before equals
8625 <div class =>HTML rocks</div>
8627 <div class="">HTML rocks</div>
8631 # The PHP parser escapes the opening brace to { for some reason, so
8632 # disabled this test for it.
8634 div with braces in attribute value
8638 <div title="{}">Foo</div>
8640 <div title="{}">Foo</div>
8643 # This it very inconsistent in the PHP parser: it returns
8644 # class="class" if there is a space between the name and the equal sign (see
8645 # 'div with empty attribute value, space before equals'), but strips the
8646 # attribute completely if the space is missing. We hope that not much content
8647 # depends on this, so are implementing the behavior below in Parsoid for
8648 # consistencies' sake. Disabled for the PHP parser.
8649 # FIXME: fix this behavior in the PHP parser?
8651 div with empty attribute value, no space before equals
8655 <div class=>HTML rocks</div>
8657 <div class="">HTML rocks</div>
8662 HTML multiple attributes correction
8664 <p class="error" class="awesome">Awesome!</p>
8666 <p class="awesome">Awesome!</p>
8671 Table multiple attributes correction
8674 !+ class="error" class="awesome"| status
8679 <th class="awesome"> status
8687 <DIV ID="x">HTML ROCKS</DIV>
8689 <div id="x">HTML ROCKS</div>
8694 Non-ASCII pseudo-tags are rendered as text
8703 Pseudo-tag with URL 'name' renders as url link
8705 <http://example.com/>
8707 <p><<a rel="nofollow" class="external free" href="http://example.com/">http://example.com/</a>>
8712 text with amp in the middle of nowhere
8716 <p>Remember AT&T?
8721 text with character entity: eacute
8723 I always thought é was a cute letter.
8725 <p>I always thought é was a cute letter.
8730 text with entity-escaped character entity-like string: eacute
8732 I always thought &eacute; was a cute letter.
8734 <p>I always thought &eacute; was a cute letter.
8739 text with undefined character entity: xacute
8741 I always thought &xacute; was a cute letter.
8743 <p>I always thought &xacute; was a cute letter.
8755 [[Media:Foobar.jpg]]
8757 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Media:Foobar.jpg</a>
8762 Media link with text
8764 [[Media:Foobar.jpg|A neat file to look at]]
8766 <p><a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">A neat file to look at</a>
8770 # FIXME: this is still bad HTML tag nesting
8772 Media link with nasty text
8773 fixme: doBlockLevels won't wrap this in a paragraph because it contains a div
8775 [[Media:Foobar.jpg|Safe Link<div style=display:none>" onmouseover="alert(document.cookie)" onfoo="</div>]]
8777 <a href="http://example.com/images/3/3a/Foobar.jpg" class="internal" title="Foobar.jpg">Safe Link<div style="display:none">" onmouseover="alert(document.cookie)" onfoo="</div></a>
8782 Media link to nonexistent file (bug 1702)
8784 [[Media:No such.jpg]]
8786 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="No such.jpg">Media:No such.jpg</a>
8791 Image link to nonexistent file (bug 1850 - good)
8793 [[Image:No such.jpg]]
8795 <p><a href="/index.php?title=Special:Upload&wpDestFile=No_such.jpg" class="new" title="File:No such.jpg">File:No such.jpg</a>
8800 :Image link to nonexistent file (bug 1850 - bad)
8802 [[:Image:No such.jpg]]
8804 <p><a href="/index.php?title=File:No_such.jpg&action=edit&redlink=1" class="new" title="File:No such.jpg (page does not exist)">Image:No such.jpg</a>
8811 Character reference normalization in link text (bug 1938)
8813 [[Main Page|this&that]]
8815 <p><a href="/wiki/Main_Page" title="Main Page">this&that</a>
8822 Test for unicode normalization
8824 The page's name is U+05d0 U+05b7, with non-canonical form U+FB2E
8828 (bug 19451) Links should refer to the normalized form.
8836 <p><a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8837 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8838 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8839 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8840 <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a>
8845 Empty attribute crash test (bug 2067)
8847 <font color="">foo</font>
8849 <p><font color="">foo</font>
8854 Empty attribute crash test single-quotes (bug 2067)
8856 <font color=''>foo</font>
8858 <p><font color="">foo</font>
8863 Attribute test: equals, then nothing
8865 <font color=>foo</font>
8872 Attribute test: unquoted value
8874 <font color=x>foo</font>
8876 <p><font color="x">foo</font>
8881 Attribute test: unquoted but illegal value (hash)
8883 <font color=#x>foo</font>
8885 <p><font color="#x">foo</font>
8890 Attribute test: no value
8892 <font color>foo</font>
8894 <p><font color="color">foo</font>
8899 Bug 2095: link with three closing brackets
8903 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>]
8908 Bug 2095: link with pipe and three closing brackets
8912 <p><a href="/wiki/Main_Page" title="Main Page">link</a>]
8917 Bug 2095: link with pipe and three closing brackets, version 2
8919 [[Main Page|[http://example.com/]]]
8921 <p><a href="/wiki/Main_Page" title="Main Page">[http://example.com/]</a>
8931 Template:Dangerous attribute
8933 " onmouseover="alert(document.cookie)
8937 Template:Dangerous style attribute
8939 border-size: expression(alert(document.cookie))
8945 <div style="float: right; {{{1}}}">Magic div</div>
8949 Bug 2304: HTML attribute safety (safe template; regression bug 2309)
8951 <div title="{{test}}"></div>
8953 <div title="This is a test template"></div>
8958 Bug 2304: HTML attribute safety (dangerous template; 2309)
8960 <div title="{{dangerous attribute}}"></div>
8962 <div title=""></div>
8967 Bug 2304: HTML attribute safety (dangerous style template; 2309)
8969 <div style="{{dangerous style attribute}}"></div>
8971 <div style="/* insecure input */"></div>
8976 Bug 2304: HTML attribute safety (safe parameter; 2309)
8978 {{div style|width: 200px}}
8980 <div style="float: right; width: 200px">Magic div</div>
8985 Bug 2304: HTML attribute safety (unsafe parameter; 2309)
8987 {{div style|width: expression(alert(document.cookie))}}
8989 <div style="/* insecure input */">Magic div</div>
8994 Bug 2304: HTML attribute safety (unsafe breakout parameter; 2309)
8996 {{div style|"><script>alert(document.cookie)</script>}}
8998 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
9003 Bug 2304: HTML attribute safety (unsafe breakout parameter 2; 2309)
9005 {{div style|" ><script>alert(document.cookie)</script>}}
9007 <div style="float: right;"><script>alert(document.cookie)</script>">Magic div</div>
9012 Bug 2304: HTML attribute safety (link)
9014 <div title="[[Main Page]]"></div>
9016 <div title="[[Main Page]]"></div>
9021 Bug 2304: HTML attribute safety (italics)
9023 <div title="''foobar''"></div>
9025 <div title="''foobar''"></div>
9030 Bug 2304: HTML attribute safety (bold)
9032 <div title="'''foobar'''"></div>
9034 <div title="'''foobar'''"></div>
9040 Bug 2304: HTML attribute safety (ISBN)
9042 <div title="ISBN 1234567890"></div>
9044 <div title="ISBN 1234567890"></div>
9049 Bug 2304: HTML attribute safety (RFC)
9051 <div title="RFC 1234"></div>
9053 <div title="RFC 1234"></div>
9058 Bug 2304: HTML attribute safety (PMID)
9060 <div title="PMID 1234567890"></div>
9062 <div title="PMID 1234567890"></div>
9067 Bug 2304: HTML attribute safety (web link)
9069 <div title="http://example.com/"></div>
9071 <div title="http://example.com/"></div>
9076 Bug 2304: HTML attribute safety (named web link)
9078 <div title="[http://example.com/ link]"></div>
9080 <div title="[http://example.com/ link]"></div>
9085 Bug 3244: HTML attribute safety (extension; safe)
9087 <div style="<nowiki>background:blue</nowiki>"></div>
9089 <div style="background:blue"></div>
9094 Bug 3244: HTML attribute safety (extension; unsafe)
9096 <div style="<nowiki>border-left:expression(alert(document.cookie))</nowiki>"></div>
9098 <div style="/* insecure input */"></div>
9102 # More MSIE fun discovered by Tom Gilder
9105 MSIE CSS safety test: spurious slash
9107 <div style="background-image:u\rl(javascript:alert('boo'))">evil</div>
9109 <div style="/* insecure input */">evil</div>
9114 MSIE CSS safety test: hex code
9116 <div style="background-image:u\72l(javascript:alert('boo'))">evil</div>
9118 <div style="/* insecure input */">evil</div>
9123 MSIE CSS safety test: comment in url
9125 <div style="background-image:u/**/rl(javascript:alert('boo'))">evil</div>
9127 <div style="background-image:u rl(javascript:alert('boo'))">evil</div>
9132 MSIE CSS safety test: comment in expression
9134 <div style="background-image:expres/**/sion(alert('boo4'))">evil4</div>
9136 <div style="background-image:expres sion(alert('boo4'))">evil4</div>
9142 Table attribute legitimate extension
9145 !+ style="<nowiki>color:blue</nowiki>"| status
9150 <th style="color:blue"> status
9156 Table attribute safety
9159 !+ style="<nowiki>border-width:expression(0+alert(document.cookie))</nowiki>"| status
9164 <th style="/* insecure input */"> status
9170 CSS line continuation 1
9172 <div style="background-image: u\ rl(test.jpg);"></div>
9174 <div style="/* insecure input */"></div>
9179 CSS line continuation 2
9181 <div style="background-image: u\ rl(test.jpg); "></div>
9183 <div style="/* insecure input */"></div>
9194 Expansion of multi-line templates in attribute values (bug 6255)
9196 <div style="background: {{identity|#00FF00}}">-</div>
9198 <div style="background: #00FF00">-</div>
9204 Expansion of multi-line templates in attribute values (bug 6255 sanity check)
9206 <div style="background:
9209 <div style="background: #00FF00">-</div>
9214 Expansion of multi-line templates in attribute values (bug 6255 sanity check 2)
9216 <div style="background: #00FF00">-</div>
9218 <div style="background: #00FF00">-</div>
9223 ### Parser hooks (see maintenance/parserTestsParserHook.php for the <tag> extension)
9226 Parser hook: empty input
9239 Parser hook: empty input using terminated empty elements
9252 Parser hook: empty input using terminated empty elements (space before)
9265 Parser hook: basic input
9279 Parser hook: case insensitive
9293 Parser hook: case insensitive, redux
9306 Parser hook: nested tags
9310 <tag><tag></tag></tag>
9321 Parser hook: basic arguments
9323 <tag width=200 height = "100" depth = '50' square></tag>
9331 'square' => 'square',
9338 Parser hook: argument containing a forward slash (bug 5344)
9340 <tag filename='/tmp/bla'></tag>
9345 'filename' => '/tmp/bla',
9352 Parser hook: empty input using terminated empty elements (bug 2374)
9365 # </tag> should be output literally since there is no matching tag that begins it
9367 Parser hook: basic arguments using terminated empty elements (bug 2374)
9369 <tag width=200 height = "100" depth = '50' square/>
9379 'square' => 'square',
9388 ### (see maintenance/parserTestsStaticParserHook.php for the <statictag> extension)
9392 Parser hook: static parser hook not inside a comment
9394 <statictag>hello, world</statictag>
9395 <statictag action=flush/>
9403 Parser hook: static parser hook inside a comment
9405 <!-- <statictag>hello, world</statictag> -->
9406 <statictag action=flush/>
9412 # Nested template calls; this case was broken by Parser.php rev 1.506,
9416 Template:One-parameter
9418 (My parameter is: {{{1}}})
9422 Template:Map-one-parameter
9428 Nested template calls
9430 {{Map-one-parameter|One-parameter|param}}
9432 <p>(My parameter is: param)
9441 Sanitizer: Closing of open tags
9443 <s></s><table></table>
9445 <s></s><table></table>
9450 Sanitizer: Closing of open but not closed tags
9459 Sanitizer: Closing of closed but not open tags
9468 Sanitizer: Closing of closed but not open table tags
9470 Table not started</td></tr></table>
9472 <p>Table not started</td></tr></table>
9477 Sanitizer: Escaping of spaces, multibyte characters, colons & other stuff in id=""
9479 <span id="æ: v">byte</span>[[#æ: v|backlink]]
9481 <p><span id=".C3.A6:_v">byte</span><a href="#.C3.A6:_v">backlink</a>
9486 Sanitizer: Validating the contents of the id attribute (bug 4515)
9492 Something, but definitely not <br id="9" />...
9496 Sanitizer: Validating id attribute uniqueness (bug 4515, bug 6301)
9500 <br id="foo" /><br id="foo" />
9502 Something need to be done. foo-2 ?
9506 Sanitizer: Validating that <meta> and <link> work, but only for Microdata
9509 <meta itemprop="hello" content="world">
9510 <meta http-equiv="refresh" content="5">
9511 <meta itemprop="hello" http-equiv="refresh" content="5">
9512 <link itemprop="hello" href="{{SERVER}}">
9513 <link rel="stylesheet" href="{{SERVER}}">
9514 <link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
9517 <div itemscope="itemscope">
9518 <p> <meta itemprop="hello" content="world" />
9519 <meta http-equiv="refresh" content="5">
9520 <meta itemprop="hello" content="5" />
9522 <link itemprop="hello" href="http://example.org" />
9523 <link rel="stylesheet" href="<a rel="nofollow" class="external free" href="http://example.org">http://example.org</a>">
9524 <link itemprop="hello" href="http://example.org" />
9530 Language converter: output gets cut off unexpectedly (bug 5757)
9534 this bit is safe: }-
9536 but if we add a conversion instance: -{zh-cn:xxx;zh-tw:yyy}-
9538 then we get cut off here: }-
9540 all additional text is vanished
9542 <p>this bit is safe: }-
9543 </p><p>but if we add a conversion instance: xxx
9544 </p><p>then we get cut off here: }-
9545 </p><p>all additional text is vanished
9550 Self closed html pairs (bug 5487)
9553 <center><font id="bug" />Centered text</center>
9554 <div><font id="bug2" />In div text</div>
9556 <center><font id="bug" />Centered text</center>
9557 <div><font id="bug2" />In div text</div>
9566 Punctuation: nbsp before exclamation
9570 <p>C'est grave !
9575 Punctuation: CSS !important (bug 11874)
9577 <div style="width:50% !important">important</div>
9579 <div style="width:50% !important">important</div>
9584 Punctuation: CSS ! important (bug 11874; with space after)
9586 <div style="width:50% ! important">important</div>
9588 <div style="width:50% ! important">important</div>
9594 HTML bullet list, closed tags (bug 5497)
9609 HTML bullet list, unclosed tags (bug 5497)
9626 HTML ordered list, closed tags (bug 5497)
9641 HTML ordered list, unclosed tags (bug 5497)
9658 HTML nested bullet list, closed tags (bug 5497)
9683 HTML nested bullet list, open tags (bug 5497)
9708 HTML nested ordered list, closed tags (bug 5497)
9733 HTML nested ordered list, open tags (bug 5497)
9758 HTML ordered list item with parameters oddity
9760 <ol><li id="fragment">One</li></ol>
9762 <ol><li id="fragment">One</li></ol>
9767 bug 5918: autonumbering
9769 [http://first/] [http://second] [ftp://ftp]
9773 [mailto:enclosed@mail.tld With target]
9775 [mailto:enclosed@mail.tld]
9777 mailto:inline@mail.tld
9779 <p><a rel="nofollow" class="external autonumber" href="http://first/">[1]</a> <a rel="nofollow" class="external autonumber" href="http://second">[2]</a> <a rel="nofollow" class="external autonumber" href="ftp://ftp">[3]</a>
9780 </p><p><a rel="nofollow" class="external free" href="ftp://inlineftp">ftp://inlineftp</a>
9781 </p><p><a rel="nofollow" class="external text" href="mailto:enclosed@mail.tld">With target</a>
9782 </p><p><a rel="nofollow" class="external autonumber" href="mailto:enclosed@mail.tld">[4]</a>
9783 </p><p><a rel="nofollow" class="external free" href="mailto:inline@mail.tld">mailto:inline@mail.tld</a>
9789 # Security and HTML correctness
9790 # From Nick Jenkins' fuzz testing
9794 Fuzz testing: Parser13
9809 Fuzz testing: Parser14
9814 <h2><span class="mw-headline" id="onmouseover.3D">onmouseover=</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</span></h2>
9815 http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
9817 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
9824 Fuzz testing: Parser14-table
9829 <h2><span class="mw-headline" id="a">a</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</span></h2>
9830 <table style="__TOC__">
9836 # Known to produce bogus xml (extra </td>)
9838 Fuzz testing: Parser16
9858 Fuzz testing: Parser21
9861 ! irc://{{ftp://a" onmouseover="alert('hello world');"
9866 <th> <a rel="nofollow" class="external free" href="irc://{{ftp://a">irc://{{ftp://a</a>" onmouseover="alert('hello world');"
9876 Fuzz testing: Parser22
9878 http://===r:::https://b
9882 <p><a rel="nofollow" class="external free" href="http://===r:::https://b">http://===r:::https://b</a>
9890 # Known to produce bad XML for now
9892 Fuzz testing: Parser24
9899 | {{{{SSSll!!!!!!!VVVV)]]][[Special:*xxxxxxx--><noinclude>}}}} >
9900 <br style="onmouseover='alert(document.cookie);' " />
9902 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
9907 <u class="|">}}}} >
9908 <br style="onmouseover='alert(document.cookie);'" />
9910 MOVE YOUR MOUSE CURSOR OVER THIS TEXT
9919 # Note: the current result listed for this is not what the original one was,
9920 # but the original bug was JavaScript injection, which is fixed in any case.
9921 # It's not clear that the original result listed was any more correct than the
9922 # current one. Original result:
9925 # <li class="||">
9926 # }}}blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
9928 Fuzz testing: Parser25 (bug 6055)
9934 }}}blah" onmouseover="alert('hello world');" align="left"'''MOVE MOUSE CURSOR OVER HERE
9936 <p><LI CLASS=blah" onmouseover="alert('hello world');" align="left"<b>MOVE MOUSE CURSOR OVER HERE</b>
9941 Fuzz testing: URL adjacent extension (with space, clean)
9944 http://example.com <nowiki>junk</nowiki>
9946 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a> junk
9951 Fuzz testing: URL adjacent extension (no space, dirty; nowiki)
9954 http://example.com<nowiki>junk</nowiki>
9956 <p><a rel="nofollow" class="external free" href="http://example.com">http://example.com</a>junk
9961 Fuzz testing: URL adjacent extension (no space, dirty; pre)
9964 http://example.com<pre>junk</pre>
9966 <a rel="nofollow" class="external free" href="http://example.com">http://example.com</a><pre>junk</pre>
9971 Fuzz testing: image with bogus manual thumbnail
9973 [[Image:foobar.jpg|thumbnail= ]]
9975 <div class="thumb tright"><div class="thumbinner" style="width:182px;">Error creating thumbnail: <div class="thumbcaption"></div></div></div>
9980 Fuzz testing: encoded newline in generated HTML replacements (bug 6577)
9982 <pre dir=" "></pre>
9984 <pre dir=" "></pre>
9989 Parsing optional HTML elements (Bug 6171)
9994 <td> Some tabular data</td>
9995 <td> More tabular data ...
9996 <td> And yet som tabular data</td>
10002 <td> Some tabular data</td>
10003 <td> More tabular data ...
10004 </td><td> And yet som tabular data</td>
10011 Correct handling of <td>, <tr> (Bug 6171)
10016 <td> Some tabular data</td>
10017 <td> More tabular data ...</td>
10018 <td> And yet som tabular data</td>
10024 <td> Some tabular data</td>
10025 <td> More tabular data ...</td>
10026 <td> And yet som tabular data</td>
10034 Parsing crashing regression (fr:JavaScript)
10038 <p></body></x>
10043 Inline wiki vs wiki block nesting
10049 <p><b>Bold paragraph</b>
10050 </p><p>New wiki paragraph
10055 Inline HTML vs wiki block nesting
10063 <p><b>Bold paragraph</b>
10064 </p><p>New wiki paragraph
10068 # Original result was this:
10069 # <p><b>bold</b><b>bold<i>bolditalics</i></b>
10071 # While that might be marginally more intuitive, maybe, the six-apostrophe
10072 # construct is clearly pathological and the result stated here (which is what
10073 # the parser actually does) is about as reasonable as anything.
10075 Mixing markup for italics and bold
10078 '''bold''''''bold''bolditalics'''''
10080 <p>'<i>bold'</i><b>bold<i>bolditalics</i></b>
10088 Article for special page transclusion test
10092 Special page transclusion
10095 {{Special:Prefixindex/Xyzzyx}}
10097 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
10102 Special page transclusion twice (bug 5021)
10105 {{Special:Prefixindex/Xyzzyx}}
10106 {{Special:Prefixindex/Xyzzyx}}
10108 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
10109 <table id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
10114 Transclusion of default MediaWiki message
10116 {{MediaWiki:Mainpage}}
10123 Transclusion of nonexistent MediaWiki message
10125 {{MediaWiki:Mainpagexxx}}
10127 <p><a href="/index.php?title=MediaWiki:Mainpagexxx&action=edit&redlink=1" class="new" title="MediaWiki:Mainpagexxx (page does not exist)">MediaWiki:Mainpagexxx</a>
10132 Transclusion of MediaWiki message with underscore
10134 {{MediaWiki:history_short}}
10141 Transclusion of MediaWiki message with space
10143 {{MediaWiki:history short}}
10150 Invalid header with following text
10160 Section extraction test (section 0)
10180 Section extraction test (section 1)
10202 Section extraction test (section 2)
10223 Section extraction test (section 3)
10243 Section extraction test (section 4)
10267 Section extraction test (section 5)
10287 Section extraction test (section 6)
10308 Section extraction test (section 7)
10328 Section extraction test (section 8)
10348 Section extraction test (section 9)
10369 Section extraction test (section 10)
10389 Section extraction test (nonexistent section 11)
10408 Section extraction test with bogus heading (section 1)
10413 ==bogus== not a legal section
10417 ==bogus== not a legal section
10421 Section extraction test with bogus heading (section 2)
10426 ==bogus== not a legal section
10433 Section extraction test with comment after heading (section 1)
10445 Section extraction test with comment after heading (section 2)
10457 Section extraction test with bogus <nowiki> heading (section 1)
10462 ==bogus== <nowiki>not a legal section</nowiki>
10466 ==bogus== <nowiki>not a legal section</nowiki>
10470 Section extraction test with bogus <nowiki> heading (section 2)
10475 ==bogus== <nowiki>not a legal section</nowiki>
10482 # Formerly testing for bug 2587, now resolved by the use of unmarked sections
10483 # instead of respecting commented sections
10485 Section extraction prefixed by comment (section 1)
10496 Section extraction prefixed by comment (section 2)
10507 # Formerly testing for bug 2607, now resolved by the use of unmarked sections
10508 # instead of respecting HTML-style headings
10510 Section extraction, mixed wiki and html (section 1)
10526 Section extraction, mixed wiki and html (section 2)
10542 # Formerly testing for bug 3342
10544 Section extraction, heading surrounded by <noinclude>
10548 <noinclude>==unmarked==</noinclude>
10554 # Test behavior of bug 19910
10556 Sectiion with all-equals
10561 The line above must have a trailing space
10564 But just in case it doesn't...
10568 But just in case it doesn't...
10572 Section replacement test (section 0)
10603 Section replacement test (section 1)
10632 Section replacement test (section 2)
10662 Section replacement test (section 3)
10693 Section replacement test (section 4)
10720 Section replacement test (section 5)
10751 Section replacement test (section 6)
10781 Section replacement test (section 7)
10812 Section replacement test (section 8)
10843 Section replacement test (section 9)
10872 Section replacement test (section 10)
10902 Section replacement test with initial whitespace (bug 13728)
10906 Preformatted initial line
10910 Preformatted initial line
10917 Section extraction, heading followed by pre with 20 spaces (bug 6398)
10929 Section extraction, heading followed by pre with 19 spaces (bug 6398 sanity check)
10942 Section extraction, <pre> around bogus header (bug 10309)
10959 Section replacement, <pre> around bogus header (bug 10309)
10961 noxml replace=2,"xxx"
10982 Handling of 
 in URLs
10986 <ul><li><ul><li><a rel="nofollow" class="external free" href="irc://%0Aa">irc://%0Aa</a>
10993 5 quotes, code coverage +1 line (php)
11000 # The PHP parser strips the empty tags out for giggles; parsoid doesn't.
11002 5 quotes, code coverage +1 line (parsoid)
11008 <p><i><b></b></i></p>
11012 Special:Search page linking.
11016 <p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a>
11028 * {{ROOTPAGENAMEE}}
11030 * {{BASEPAGENAMEE}}
11032 * {{TALKPAGENAMEE}}
11033 * {{SUBJECTPAGENAME}}
11034 * {{SUBJECTPAGENAMEE}}
11040 * {{SUBJECTSPACEE}}
11041 * {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}}
11043 <ul><li> Parser test
11044 </li><li> Parser test
11045 </li><li> Parser test
11046 </li><li> Parser_test
11047 </li><li> Parser test
11048 </li><li> Parser_test
11049 </li><li> Parser test
11050 </li><li> Parser_test
11051 </li><li> Talk:Parser test
11052 </li><li> Talk:Parser_test
11053 </li><li> Parser test
11054 </li><li> Parser_test
11061 </li><li> <a href="/index.php?title=Template:Dynamic&action=edit&redlink=1" class="new" title="Template:Dynamic (page does not exist)">Template:Dynamic</a>
11065 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included.
11075 image4 |300px| centre
11076 image5.svg| http://///////
11081 <ul class="gallery">
11082 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11083 <div style="height: 150px;">Image1.png</div>
11084 <div class="gallerytext">
11087 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11088 <div style="height: 150px;">Image2.gif</div>
11089 <div class="gallerytext">
11094 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11095 <div style="height: 150px;">Image3</div>
11096 <div class="gallerytext">
11099 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11100 <div style="height: 150px;">Image4</div>
11101 <div class="gallerytext">
11106 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11107 <div style="height: 150px;">Image5.svg</div>
11108 <div class="gallerytext">
11109 <p><a rel="nofollow" class="external free" href="http://///////">http://///////</a>
11113 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11114 <div style="height: 150px;">* image6</div>
11115 <div class="gallerytext">
11123 Gallery (with options)
11125 <gallery widths='70px' heights='40px' perrow='2' caption='Foo [[Main Page]]' >
11126 File:Nonexistant.jpg|caption
11127 File:Nonexistant.jpg
11128 image:foobar.jpg|some '''caption''' [[Main Page]]
11130 image:foobar.jpg|Blabla|alt=This is a foo-bar.|blabla.
11133 <ul class="gallery" style="max-width: 226px;_width: 226px;">
11134 <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li>
11135 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
11136 <div style="height: 70px;">Nonexistant.jpg</div>
11137 <div class="gallerytext">
11142 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
11143 <div style="height: 70px;">Nonexistant.jpg</div>
11144 <div class="gallerytext">
11147 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
11148 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
11149 <div class="gallerytext">
11150 <p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11154 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
11155 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
11156 <div class="gallerytext">
11159 <li class="gallerybox" style="width: 105px"><div style="width: 105px">
11160 <div class="thumb" style="width: 100px;"><div style="margin:31px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="This is a foo-bar." src="http://example.com/images/thumb/3/3a/Foobar.jpg/70px-Foobar.jpg" width="70" height="8" /></a></div></div>
11161 <div class="gallerytext">
11171 Gallery with wikitext inside caption
11174 File:foobar.jpg|[[File:foobar.jpg|20px|desc|alt=inneralt]]|alt=galleryalt
11175 File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt
11178 <ul class="gallery">
11179 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11180 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
11181 <div class="gallerytext">
11182 <p><a href="/wiki/File:Foobar.jpg" class="image" title="desc"><img alt="inneralt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/20px-Foobar.jpg" width="20" height="2" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/30px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/40px-Foobar.jpg 2x" /></a>
11186 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11187 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
11188 <div class="gallerytext">
11189 <p>This is a test template
11198 gallery (with showfilename option)
11200 <gallery showfilename>
11201 File:Nonexistant.jpg|caption
11202 File:Nonexistant.jpg
11203 image:foobar.jpg|some '''caption''' [[Main Page]]
11207 <ul class="gallery">
11208 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11209 <div style="height: 150px;">Nonexistant.jpg</div>
11210 <div class="gallerytext">
11211 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
11216 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11217 <div style="height: 150px;">Nonexistant.jpg</div>
11218 <div class="gallerytext">
11219 <p><a href="/wiki/File:Nonexistant.jpg" title="File:Nonexistant.jpg">Nonexistant.jpg</a><br />
11223 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11224 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
11225 <div class="gallerytext">
11226 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
11227 some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a>
11231 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11232 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
11233 <div class="gallerytext">
11234 <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br />
11243 Gallery (with namespace-less filenames)
11246 File:Nonexistant.jpg
11252 <ul class="gallery">
11253 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11254 <div style="height: 150px;">Nonexistant.jpg</div>
11255 <div class="gallerytext">
11258 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11259 <div style="height: 150px;">Nonexistant.jpg</div>
11260 <div class="gallerytext">
11263 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11264 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
11265 <div class="gallerytext">
11268 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
11269 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
11270 <div class="gallerytext">
11278 HTML Hex character encoding (spells the word "JavaScript")
11280 JavaScript
11282 <p>JavaScript
11287 HTML Hex character encoding bogus encoding (bug 26437 regression check)
11291 <p>&#xsee;&#XSEE;
11296 HTML Hex character encoding mixed case
11305 __FORCETOC__ override
11317 ISBN 978-0-1234-56 789
11319 <p><a href="/wiki/Special:BookSources/9780123456" class="internal mw-magiclink-isbn">ISBN 978-0-1234-56</a> 789
11324 ISBN followed by 5 spaces
11335 ISBN ISBN 1234567890
11337 <p>ISBN <a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
11342 Bug 22905: <abbr> followed by ISBN followed by </a>
11344 <abbr>(fr)</abbr> ISBN 2753300917 [http://www.example.com example.com]
11346 <p><abbr>(fr)</abbr> <a href="/wiki/Special:BookSources/2753300917" class="internal mw-magiclink-isbn">ISBN 2753300917</a> <a rel="nofollow" class="external text" href="http://www.example.com">example.com</a>
11355 <p>RFC <a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc1234">RFC 1234</a>
11360 Double RFC with a wiki link
11364 <p>RFC <a href="/index.php?title=RFC_1234&action=edit&redlink=1" class="new" title="RFC 1234 (page does not exist)">RFC 1234</a>
11373 <p><a class="external mw-magiclink-rfc" rel="nofollow" href="//tools.ietf.org/html/rfc983">RFC 983</a> 987
11378 Centre-aligned image
11380 [[Image:foobar.jpg|centre]]
11382 <div class="center"><div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div>
11389 [[Image:foobar.jpg|none]]
11391 <div class="floatnone"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
11396 Width + Height sized image (using px) (height is ignored)
11398 [[Image:foobar.jpg|640x480px]]
11400 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
11405 Width-sized image (using px, no following whitespace)
11407 [[Image:foobar.jpg|640px]]
11409 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
11414 Width-sized image (using px, with following whitespace - test regression from r39467)
11416 [[Image:foobar.jpg|640px ]]
11418 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
11423 Width-sized image (using px, with preceding whitespace - test regression from r39467)
11425 [[Image:foobar.jpg| 640px]]
11427 <p><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/960px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/1280px-Foobar.jpg 2x" /></a>
11432 Another italics / bold test
11440 # Note the results may be incorrect, as parserTest output included this:
11441 # XML error: Mismatched tag at byte 6120:
11442 # ...<dd> </dt></dl> </dd...
11450 <dl><dd><dl><dt><dl><dt><dl><dt><dl><dd><dl><dd>
11461 # Images with the "|" character in external URLs in comment tags; Eats half the comment, leaves unmatched "</a>" tag.
11463 Images with the "|" character in the comment
11465 [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]]
11467 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a rel="nofollow" class="external text" href="http://test/?param1=%7Cleft%7C&param2=%7Cx">external</a> URL</div></div></div>
11472 [Before] HTML without raw HTML enabled ($wgRawHtml==false)
11474 <html><script>alert(1);</script></html>
11476 <p><html><script>alert(1);</script></html>
11481 HTML with raw HTML ($wgRawHtml==true)
11485 <html><script>alert(1);</script></html>
11487 <p><script>alert(1);</script>
11492 Parents of subpages, one level up
11494 subpage title=[[Subpage test/L1/L2/L3]]
11498 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">L2</a>
11504 Parents of subpages, one level up, not named
11506 subpage title=[[Subpage test/L1/L2/L3]]
11510 <p><a href="/index.php?title=Subpage_test/L1/L2&action=edit&redlink=1" class="new" title="Subpage test/L1/L2 (page does not exist)">Subpage test/L1/L2</a>
11517 Parents of subpages, two levels up
11519 subpage title=[[Subpage test/L1/L2/L3]]
11525 <p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1</a>2
11526 </p><p><a href="/index.php?title=Subpage_test/L1&action=edit&redlink=1" class="new" title="Subpage test/L1 (page does not exist)">L1l</a>
11531 Parents of subpages, two levels up, without trailing slash or name.
11533 subpage title=[[Subpage test/L1/L2/L3]]
11542 Parents of subpages, two levels up, with lots of extra trailing slashes.
11544 subpage title=[[Subpage test/L1/L2/L3]]
11548 <p><a href="/index.php?title=Subpage_test/L1////&action=edit&redlink=1" class="new" title="Subpage test/L1//// (page does not exist)">///</a>
11553 Definition list code coverage
11559 <dl><dt> title  </dt><dd> def
11560 </dd><dt> title </dt><dd> def
11561 </dd><dt>title</dt><dd> def
11567 Don't fall for the self-closing div
11569 <div>hello world</div/>
11571 <div>hello world</div>
11580 <p>[[:Template:Msg]]
11589 <p><a href="/index.php?title=Template:QUERTY&action=edit&redlink=1" class="new" title="Template:QUERTY (page does not exist)">Template:QUERTY</a>
11593 # This isn't needed for XHTML conformance, but would be handy as a fallback security measure
11595 Always escape literal '>' in output, not just after '<'
11609 <p>This is a test template
11610 This is a test template
11622 Inclusion of !userCanEdit() content
11626 <h2><span class="mw-headline" id="header">header</span> <span class="mw-editsection">[<a href="/index.php?title=MediaWiki:Fake&action=edit&section=T-1" title="MediaWiki:Fake">edit</a>]</span></h2>
11632 Out-of-order TOC heading levels
11641 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
11643 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
11645 <li class="toclevel-2 tocsection-2"><a href="#6"><span class="tocnumber">1.1</span> <span class="toctext">6</span></a></li>
11646 <li class="toclevel-2 tocsection-3"><a href="#3"><span class="tocnumber">1.2</span> <span class="toctext">3</span></a></li>
11649 <li class="toclevel-1 tocsection-4"><a href="#1"><span class="tocnumber">2</span> <span class="toctext">1</span></a>
11651 <li class="toclevel-2 tocsection-5"><a href="#5"><span class="tocnumber">2.1</span> <span class="toctext">5</span></a></li>
11652 <li class="toclevel-2 tocsection-6"><a href="#2_2"><span class="tocnumber">2.2</span> <span class="toctext">2</span></a></li>
11657 <h2><span class="mw-headline" id="2">2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: 2">edit</a>]</span></h2>
11658 <h6><span class="mw-headline" id="6">6</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: 6">edit</a>]</span></h6>
11659 <h3><span class="mw-headline" id="3">3</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: 3">edit</a>]</span></h3>
11660 <h1><span class="mw-headline" id="1">1</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: 1">edit</a>]</span></h1>
11661 <h5><span class="mw-headline" id="5">5</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: 5">edit</a>]</span></h5>
11662 <h2><span class="mw-headline" id="2_2">2</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=6" title="Edit section: 2">edit</a>]</span></h2>
11668 ISBN with a dummy number
11678 ISBN with space-delimited number
11682 <p><a href="/wiki/Special:BookSources/9290170328" class="internal mw-magiclink-isbn">ISBN 92 9017 032 8</a>
11688 ISBN with multiple spaces, no number
11707 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1234567890</a>
11708 </p><p>ISBN 12345678901
11714 ISBN with trailing year (bug 8110)
11716 ISBN 1-234-56789-0 - 2006
11718 ISBN 1 234 56789 0 - 2006
11720 <p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1-234-56789-0</a> - 2006
11721 </p><p><a href="/wiki/Special:BookSources/1234567890" class="internal mw-magiclink-isbn">ISBN 1 234 56789 0</a> - 2006
11729 {{anchorencode:foo bar©#%n}}
11731 <p>foo_bar.C2.A9.23.25n
11736 anchorencode trims spaces
11738 {{anchorencode: __pretty__please__}}
11745 anchorencode deals with links
11747 {{anchorencode: [[hello|world]] [[hi]]}}
11754 anchorencode deals with templates
11756 {{anchorencode: {{Foo}} }}
11763 anchorencode encodes like the TOC generator: (bug 18431)
11765 === _ +:.3A%3A&&]] ===
11766 {{anchorencode: _ +:.3A%3A&&]] }}
11769 <h3><span class="mw-headline" id=".2B:.3A.253A.26.26.5D.5D">_ +:.3A%3A&&]]</span> </h3>
11770 <p>.2B:.3A.253A.26.26.5D.5D
11774 # Expected output in the following test is not necessarily expected (there
11775 # should probably be <p> tags inside the <blockquote> in the output) -- it's
11776 # only testing for well-formedness.
11778 Bug 6200: blockquotes and paragraph formatting
11798 Bug 8293: Use of center tag ruins paragraph formatting
11819 Parsing of overlapping (improperly nested) inline html tags (PHP parser)
11823 <span><s>x</span></s>
11825 <p><span><s>x</span></s></span>
11830 Parsing of overlapping (improperly nested) inline html tags (Parsoid)
11834 <span><s>x</span></s>
11836 <p><span><s>x</s></span><s></s>
11841 ### Language variants related tests
11844 Self-link in language variants
11846 title=[[Dunav]] language=sr
11848 Both [[Dunav]] and [[Дунав]] are names for this river.
11850 <p>Both <strong class="selflink">Dunav</strong> and <strong class="selflink">Дунав</strong> are names for this river.
11861 Link to another existing title shouldn't be parsed as self-link even if it's a variant of this title
11863 title=[[Duna]] language=sr
11865 [[Дуна]] is not a self-link while [[Duna]] and [[Dуна]] are still self-links.
11867 <p><a href="/wiki/%D0%94%D1%83%D0%BD%D0%B0" title="Дуна">Дуна</a> is not a self-link while <strong class="selflink">Duna</strong> and <strong class="selflink">Dуна</strong> are still self-links.
11872 Link to pages in language variants
11876 Main Page can be written as [[Маин Паге]]
11878 <p>Main Page can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>
11884 Multiple links to pages in language variants
11888 [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]].
11890 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a> same as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>.
11896 Simple template in language variants
11902 <p>This is a test template
11908 Template with explicit namespace in language variants
11914 <p>This is a test template
11920 Basic test for template parameter in language variants
11924 {{парамтест|param=foo}}
11926 <p>This is a test template with parameter foo
11932 Simple category in language variants
11936 [[Category:МедиаWики Усер'с Гуиде]]
11938 <a href="/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%98%D0%B0:MediaWiki_User%27s_Guide" title="Категорија:MediaWiki User's Guide">MediaWiki User's Guide</a>
11955 Don't convert blue categorylinks to another variant (bug 33210)
11959 [[A]][[Category:分类]]
11961 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
11966 Stripping -{}- tags (language variants)
11970 Latin proverb: -{Ne nuntium necare}-
11972 <p>Latin proverb: Ne nuntium necare
11978 Prevent conversion with -{}- tags (language variants)
11980 language=sr variant=sr-ec
11982 Latinski: -{Ne nuntium necare}-
11984 <p>Латински: Ne nuntium necare
11990 Prevent conversion of text with -{}- tags (language variants)
11992 language=sr variant=sr-ec
11994 Latinski: -{Ne nuntium necare}-
11996 <p>Латински: Ne nuntium necare
12002 Prevent conversion of links with -{}- tags (language variants)
12004 language=sr variant=sr-ec
12008 <p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>
12014 -{}- tags within headlines (within html for parserConvert())
12016 language=sr variant=sr-ec
12020 <h2><span class="mw-headline" id="-.7BNaslov.7D-">Naslov</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Уредите одељак „Naslov“">уреди</a>]</span></h2>
12026 Explicit definition of language variant alternatives
12028 language=zh variant=zh-tw
12030 -{zh:China;zh-tw:Taiwan}-, not China
12032 <p>Taiwan, not China
12038 Conversion around HTML tags
12040 language=sr variant=sr-ec
12042 -{H|span=>sr-ec:script;title=>sr-ec:src;}-
12043 <span title="La-{sr-el:L;sr-ec:C;}-tin">ski</span>
12046 <span title="ЛаCтин">ски</span>
12052 Explicit session-wise language variant mapping (A flag and - flag)
12054 language=zh variant=zh-tw
12056 Taiwan is not China.
12057 But -{A|zh:China;zh-tw:Taiwan}- is China,
12058 (This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
12059 and -{China}- is China.
12061 <p>Taiwan is not China.
12062 But Taiwan is Taiwan,
12063 (This should be stripped!)
12064 and China is China.
12069 Explicit session-wise language variant mapping (H flag for hide)
12071 language=zh variant=zh-tw
12073 (This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
12076 <p>(This should be stripped!)
12082 Adding explicit conversion rule for title (T flag)
12084 language=zh variant=zh-tw showtitle
12086 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
12089 <p>Should be stripped!
12094 Testing that changing the language variant here in the tests actually works
12096 language=zh variant=zh showtitle
12098 Should be stripped-{T|zh:China;zh-tw:Taiwan}-!
12101 <p>Should be stripped!
12106 Recursive conversion of alt and title attrs shouldn't clear converter state
12108 language=zh variant=zh-cn showtitle
12110 -{H|zh-cn:Exclamation;zh-tw:exclamation;}-
12111 Should be stripped-{T|zh-cn:China;zh-tw:Taiwan}-<span title="exclamation">!</span>
12115 Should be stripped<span title="Exclamation">!</span>
12120 Bug 24072: more test on conversion rule for title
12122 language=zh variant=zh-tw showtitle
12124 This should be stripped-{T|zh:China;zh-tw:Taiwan}-!
12125 This won't take interferes with the title rule-{H|zh:Beijing;zh-tw:Taipei}-.
12128 <p>This should be stripped!
12129 This won't take interferes with the title rule.
12134 Raw output of variant escape tags (R flag)
12136 language=zh variant=zh-tw
12138 Raw: -{R|zh:China;zh-tw:Taiwan}-
12140 <p>Raw: zh:China;zh-tw:Taiwan
12145 Nested using of manual convert syntax
12147 language=zh variant=zh-hk
12149 Nested: -{zh-hans:Hi -{zh-cn:China;zh-sg:Singapore;}-;zh-hant:Hello -{zh-tw:Taiwan;zh-hk:H-{ong}- K-{}-ong;}-;}-!
12151 <p>Nested: Hello Hong Kong!
12156 Proper conversion of text in external links
12158 language=sr variant=sr-ec
12160 http://www.google.com
12161 gopher://www.google.com
12162 [http://www.google.com http://www.google.com]
12163 [gopher://www.google.com gopher://www.google.com]
12164 [https://www.google.com irc://www.google.com]
12165 [ftp://www.google.com www.google.com/ftp://dir]
12166 [//www.google.com www.google.com]
12168 <p><a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
12169 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
12170 <a rel="nofollow" class="external free" href="http://www.google.com">http://www.google.com</a>
12171 <a rel="nofollow" class="external free" href="gopher://www.google.com">gopher://www.google.com</a>
12172 <a rel="nofollow" class="external text" href="https://www.google.com">irc://www.google.com</a>
12173 <a rel="nofollow" class="external text" href="ftp://www.google.com">www.гоогле.цом/фтп://дир</a>
12174 <a rel="nofollow" class="external text" href="//www.google.com">www.гоогле.цом</a>
12179 Do not convert roman numbers to language variants
12181 language=sr variant=sr-ec
12185 <p>Фридрих IV је цар.
12190 Unclosed language converter markup "-{"
12201 Don't convert raw rule "-{R|=>}-" to "=>"
12218 Bug 529: Uncovered bullet
12228 # Plain MediaWiki does not remove empty lists, but tidy actually does.
12229 # Templates in Wikipedia rely on this behavior, as tidy has always been
12230 # enabled there. These tests are normally run *without* tidy, so specify the
12231 # full output here.
12232 # To test realistic parsing behavior, apply a tidy-like transformation to both
12233 # the expected output and your parser's output.
12235 Bug 529: Uncovered bullet leaving empty list, normally removed by tidy
12237 ******* Foo {{bullet}}
12239 <ul><li><ul><li><ul><li><ul><li><ul><li><ul><li><ul><li> Foo
12252 Bug 529: Uncovered table already at line-start
12275 Bug 529: Uncovered bullet in parser function result
12277 * Foo {{lc:{{bullet}} }}
12286 Bug 5678: Double-parsed template argument
12288 {{lc:{{{1}}}|hello}}
12295 Bug 5678: Double-parsed template invocation
12297 {{lc:{{paramtest {{!}} param = hello }} }}
12299 <p>{{paramtest | param = hello }}
12304 Case insensitivity of parser functions for non-ASCII characters (bug 8143)
12307 title=[[Main Page]]
12309 {{PRVNÍVELKÉ:ěščř}}
12310 {{prvnívelké:ěščř}}
12330 Morwen/13: Unclosed link followed by heading
12337 <h2><span class="mw-headline" id="heading">heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a>]</span></h2>
12342 HHP2.1: Heuristics for headings in preprocessor parenthetical structures
12349 <h1><span class="mw-headline" id="heading">heading</span> </h1>
12354 HHP2.2: Heuristics for headings in preprocessor parenthetical structures
12361 <h2><span class="mw-headline" id="heading">heading</span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: heading">edit</a>]</span></h2>
12376 Paragraphs inside divs (no extra line breaks)
12388 Paragraphs inside divs (extra line break on open)
12403 Paragraphs inside divs (extra line break on close)
12418 Paragraphs inside divs (extra line break on open and close)
12435 Nesting tags, paragraphs on lines which begin with <div>
12439 <div></div><strong>A
12448 # Bug 6200: <blockquote> should behave like <div> with respect to line breaks
12450 Bug 6200: paragraphs inside blockquotes (no extra line breaks)
12454 <blockquote>Line one
12456 Line two</blockquote>
12458 <blockquote>Line one
12459 Line two</blockquote>
12464 Bug 6200: paragraphs inside blockquotes (extra line break on open)
12471 Line two</blockquote>
12476 Line two</blockquote>
12481 Bug 6200: paragraphs inside blockquotes (extra line break on close)
12485 <blockquote>Line one
12490 <blockquote>Line one
12498 Bug 6200: paragraphs inside blockquotes (extra line break on open and close)
12517 Paragraphs inside blockquotes/divs (no extra line breaks)
12519 <blockquote><div>Line one
12521 Line two</div></blockquote>
12523 <blockquote><div>Line one
12524 Line two</div></blockquote>
12529 Paragraphs inside blockquotes/divs (extra line break on open)
12534 Line two</div></blockquote>
12539 Line two</div></blockquote>
12544 Paragraphs inside blockquotes/divs (extra line break on close)
12546 <blockquote><div>Line one
12549 </div></blockquote>
12551 <blockquote><div>Line one
12554 </div></blockquote>
12559 Paragraphs inside blockquotes/divs (extra line break on open and close)
12565 </div></blockquote>
12571 </div></blockquote>
12576 Interwiki links trounced by replaceExternalLinks after early LinkHolderArray expansion
12578 wgLinkHolderBatchSize=0
12584 <p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a>
12585 <a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a>
12586 <a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a>
12591 Free external link invading image caption
12593 [[Image:Foobar.jpg|thumb|http://x|hello]]
12595 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/270px-Foobar.jpg 1.5x, http://example.com/images/thumb/3/3a/Foobar.jpg/360px-Foobar.jpg 2x" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>hello</div></div></div>
12600 Bug 15196: localised external link numbers
12604 [http://en.wikipedia.org/]
12606 <p><a rel="nofollow" class="external autonumber" href="http://en.wikipedia.org/">[۱]</a>
12611 Multibyte character in padleft
12613 {{padleft:-Hello|7|Æ}}
12620 Multibyte character in padright
12622 {{padright:Hello-|7|Æ}}
12629 formatdate parser function
12631 {{#formatdate:2009-03-24}}
12633 <p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
12638 formatdate parser function, with default format
12640 {{#formatdate:2009-03-24|mdy}}
12642 <p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
12647 Spacing of numbers in formatted dates
12649 {{#formatdate:January 15}}
12651 <p><span class="mw-formatted-date" title="01-15">January 15</span>
12656 formatdate parser function, with default format and on a page of which the content language is always English and different from the wiki content language
12658 language=nl title=[[MediaWiki:Common.css]]
12660 {{#formatdate:2009-03-24|dmy}}
12662 <p><span class="mw-formatted-date" title="2009-03-24">24 March 2009</span>
12675 Edit comment with link
12679 I like the [[Main Page]] a lot
12681 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
12685 Edit comment with link and link text
12689 I like the [[Main Page|best pages]] a lot
12691 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
12695 Edit comment with link and link text with suffix
12699 I like the [[Main Page|best page]]s a lot
12701 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
12705 Edit comment with section link (non-local, eg in history list)
12707 comment title=[[Main Page]]
12709 /* External links */ removed bogus entries
12711 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
12715 Edit comment with section link and text before it (non-local, eg in history list)
12717 comment title=[[Main Page]]
12719 pre-comment text /* External links */ removed bogus entries
12721 pre-comment text - <a href="/wiki/Main_Page#External_links" title="Main Page">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
12725 Edit comment with section link (local, eg in diff view)
12727 comment local title=[[Main Page]]
12729 /* External links */ removed bogus entries
12731 <a href="#External_links">→</a><span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
12735 Edit comment with subpage link (bug 14080)
12739 title=[[Subpage test]]
12741 Poked at a [[/subpage]] here...
12743 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
12747 Edit comment with subpage link and link text (bug 14080)
12751 title=[[Subpage test]]
12753 Poked at a [[/subpage|neat little page]] here...
12755 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
12759 Edit comment with bogus subpage link in non-subpage NS (bug 14080)
12762 title=[[Subpage test]]
12764 Poked at a [[/subpage]] here...
12766 Poked at a <a href="/index.php?title=/subpage&action=edit&redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
12770 Edit comment with bare anchor link (local, as on diff)
12774 title=[[Main Page]]
12778 <a href="#section">#section</a>
12782 Edit comment with bare anchor link (non-local, as on history)
12785 title=[[Main Page]]
12789 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
12793 Anchor starting with underscore
12797 <p><a href="#_ref">One</a>
12802 Id starting with underscore
12804 <div id="_ref"></div>
12806 <div id="_ref"></div>
12811 Space normalisation on autocomment (bug 22784)
12814 title=[[Main Page]]
12816 /* __hello__world__ */
12818 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a><span dir="auto"><span class="autocomment">__hello__world__</span></span>
12822 percent-encoding and + signs in comments (Bug 26410)
12826 [[ABC%33D% ++]] [[ABC%33D% ++|+%20]]
12828 <a href="/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">ABC3D% ++</a> <a href="/index.php?title=ABC3D%25_%2B%2B&action=edit&redlink=1" class="new" title="ABC3D% ++ (page does not exist)">+%20</a>
12832 Bad images - basic functionality
12841 Bad images - bug 16039: text after bad image disappears
12855 Verify that displaytitle works (bug #22501) no displaytitle
12859 wgAllowDisplayTitle=true
12860 wgRestrictDisplayTitle=false
12862 this is not the the title
12865 <p>this is not the the title
12870 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false
12875 wgAllowDisplayTitle=true
12876 wgRestrictDisplayTitle=false
12878 this is not the the title
12879 {{DISPLAYTITLE:whatever}}
12882 <p>this is not the the title
12887 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch
12892 wgAllowDisplayTitle=true
12893 wgRestrictDisplayTitle=true
12895 this is not the the title
12896 {{DISPLAYTITLE:whatever}}
12899 <p>this is not the the title
12904 Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching
12909 wgAllowDisplayTitle=true
12910 wgRestrictDisplayTitle=true
12912 this is not the the title
12913 {{DISPLAYTITLE:screen}}
12916 <p>this is not the the title
12921 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false
12926 wgAllowDisplayTitle=false
12928 this is not the the title
12929 {{DISPLAYTITLE:screen}}
12932 <p>this is not the the title
12933 <a href="/index.php?title=Template:DISPLAYTITLE:screen&action=edit&redlink=1" class="new" title="Template:DISPLAYTITLE:screen (page does not exist)">Template:DISPLAYTITLE:screen</a>
12938 Verify that displaytitle works (bug #22501) AllowDisplayTitle=false no DISPLAYTITLE
12943 wgAllowDisplayTitle=false
12945 this is not the the title
12948 <p>this is not the the title
12953 preload: check <noinclude> and <includeonly>
12957 Hello <noinclude>cruel</noinclude><includeonly>kind</includeonly> world.
12963 preload: check <onlyinclude>
12967 Goodbye <onlyinclude>Hello world</onlyinclude>
12973 preload: can pass tags through if we want to
12977 <includeonly><</includeonly>includeonly>Hello world<includeonly><</includeonly>/includeonly>
12979 <includeonly>Hello world</includeonly>
12983 preload: check that it doesn't try to do tricks
12987 * <!-- Hello --> ''{{world}}'' {{<includeonly>subst:</includeonly>How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
12989 * <!-- Hello --> ''{{world}}'' {{subst:How are you}}{{ {{{|safesubst:}}} #if:1|2|3}}
12993 Play a bit with r67090 and bug 3158
12997 <div style="width:50% !important"> </div>
12998 <div style="width:50% !important"> </div>
12999 <div style="width:50% !important"> </div>
13000 <div style="border : solid;"> </div>
13002 <div style="width:50% !important"> </div>
13003 <div style="width:50% !important"> </div>
13004 <div style="width:50% !important"> </div>
13005 <div style="border : solid;"> </div>
13010 HTML5 data attributes
13012 <span data-foo="bar">Baz</span>
13013 <p data-abc-def_hij="">Quuz</p>
13015 <p><span data-foo="bar">Baz</span>
13017 <p data-abc-def_hij="">Quuz</p>
13022 percent-encoding and + signs in internal links (Bug 26410)
13024 [[User:+%]] [[Page+title%]]
13025 [[%+]] [[%+|%20]] [[%+ ]] [[%+r]]
13026 [[%]] [[+]] [[image:%+abc%39|foo|[[bar]]]]
13027 [[%33%45]] [[%33%45+]]
13029 <p><a href="/index.php?title=User:%2B%25&action=edit&redlink=1" class="new" title="User:+% (page does not exist)">User:+%</a> <a href="/index.php?title=Page%2Btitle%25&action=edit&redlink=1" class="new" title="Page+title% (page does not exist)">Page+title%</a>
13030 <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+</a> <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%20</a> <a href="/index.php?title=%25%2B&action=edit&redlink=1" class="new" title="%+ (page does not exist)">%+ </a> <a href="/index.php?title=%25%2Br&action=edit&redlink=1" class="new" title="%+r (page does not exist)">%+r</a>
13031 <a href="/index.php?title=%25&action=edit&redlink=1" class="new" title="% (page does not exist)">%</a> <a href="/index.php?title=%2B&action=edit&redlink=1" class="new" title="+ (page does not exist)">+</a> <a href="/index.php?title=Special:Upload&wpDestFile=%25%2Babc9" class="new" title="File:%+abc9">bar</a>
13032 <a href="/index.php?title=3E&action=edit&redlink=1" class="new" title="3E (page does not exist)">3E</a> <a href="/index.php?title=3E%2B&action=edit&redlink=1" class="new" title="3E+ (page does not exist)">3E+</a>
13037 Special characters in embedded file links (bug 27679)
13039 [[File:Contains & ampersand.jpg]]
13040 [[File:Does not exist.jpg|Title with & ampersand]]
13042 <p><a href="/index.php?title=Special:Upload&wpDestFile=Contains_%26_ampersand.jpg" class="new" title="File:Contains & ampersand.jpg">File:Contains & ampersand.jpg</a>
13043 <a href="/index.php?title=Special:Upload&wpDestFile=Does_not_exist.jpg" class="new" title="File:Does not exist.jpg">Title with & ampersand</a>
13049 Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4)
13051 Text's been normalized?
13053 <p>Text's been normalized?
13058 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate free external links
13060 http://www.example.org/ <-- U+3000 (vim: ^Vu3000)
13062 <p><a rel="nofollow" class="external free" href="http://www.example.org/">http://www.example.org/</a> <-- U+3000 (vim: ^Vu3000)
13067 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate bracketed external links
13069 [http://www.example.org/ ideograms]
13071 <p><a rel="nofollow" class="external text" href="http://www.example.org/">ideograms</a>
13076 Bug 19052 U+3000 IDEOGRAPHIC SPACE should terminate external images links
13078 http://www.example.org/pic.png <-- U+3000 (vim: ^Vu3000)
13080 <p><img src="http://www.example.org/pic.png" alt="pic.png" /> <-- U+3000 (vim: ^Vu3000)
13104 Bug 31098 Template which includes system messages which includes the template
13108 <p><span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
13109 <span class="error">Template loop detected: <a href="/wiki/Template:Identical" title="Template:Identical">Template:Identical</a></span>
13114 Bug31490 Turkish: ucfirst 'blah'
13125 Bug31490 Turkish: ucfirst 'ix'
13136 Bug31490 Turkish: lcfirst 'BLAH'
13147 Bug31490 Turkish: ucfırst (with a dotless i)
13153 <p><a href="/index.php?title=%C5%9Eablon:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Şablon:Ucfırst:blah (sayfa mevcut değil)">Şablon:Ucfırst:blah</a>
13158 Bug31490 ucfırst (with a dotless i) with English language
13164 <p><a href="/index.php?title=Template:Ucf%C4%B1rst:blah&action=edit&redlink=1" class="new" title="Template:Ucfırst:blah (page does not exist)">Template:Ucfırst:blah</a>
13169 Bug 26375: TOC with italics
13171 title=[[Main Page]]
13174 == ''Lost'' episodes ==
13176 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
13178 <li class="toclevel-1 tocsection-1"><a href="#Lost_episodes"><span class="tocnumber">1</span> <span class="toctext"><i>Lost</i> episodes</span></a></li>
13181 <h2><span class="mw-headline" id="Lost_episodes"><i>Lost</i> episodes</span> <span class="mw-editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Lost episodes">edit</a>]</span></h2>
13186 Bug 26375: TOC with bold
13188 title=[[Main Page]]
13191 == '''should be bold''' then normal text ==
13193 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
13195 <li class="toclevel-1 tocsection-1"><a href="#should_be_bold_then_normal_text"><span class="tocnumber">1</span> <span class="toctext"><b>should be bold</b> then normal text</span></a></li>
13198 <h2><span class="mw-headline" id="should_be_bold_then_normal_text"><b>should be bold</b> then normal text</span> <span class="mw-editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: should be bold then normal text">edit</a>]</span></h2>
13203 Bug 33845: Headings become cursive in TOC when they contain an image
13205 title=[[Main Page]]
13208 == Image [[Image:foobar.jpg]] ==
13210 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
13212 <li class="toclevel-1 tocsection-1"><a href="#Image"><span class="tocnumber">1</span> <span class="toctext">Image</span></a></li>
13215 <h2><span class="mw-headline" id="Image">Image <a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></span> <span class="mw-editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Image">edit</a>]</span></h2>
13220 Bug 33845 (2): Headings become bold in TOC when they contain a blockquote
13222 title=[[Main Page]]
13225 == <blockquote>Quote</blockquote> ==
13227 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
13229 <li class="toclevel-1 tocsection-1"><a href="#Quote"><span class="tocnumber">1</span> <span class="toctext">Quote</span></a></li>
13232 <h2><span class="mw-headline" id="Quote"><blockquote>Quote</blockquote></span> <span class="mw-editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Quote">edit</a>]</span></h2>
13237 Unclosed tags in TOC
13239 title=[[Main Page]]
13243 <small>Hanc marginis exiguitas non caperet.</small>
13246 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
13248 <li class="toclevel-1 tocsection-1"><a href="#Proof:_2_.3C_3"><span class="tocnumber">1</span> <span class="toctext">Proof: 2 < 3</span></a></li>
13251 <h2><span class="mw-headline" id="Proof:_2_.3C_3">Proof: 2 < 3</span> <span class="mw-editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Proof: 2 < 3">edit</a>]</span></h2>
13252 <p><small>Hanc marginis exiguitas non caperet.</small>
13258 Multiple tags in TOC
13261 == <i>Foo</i> <b>Bar</b> ==
13263 == <i>Foo</i> <blockquote>Bar</blockquote> ==
13265 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
13267 <li class="toclevel-1 tocsection-1"><a href="#Foo_Bar"><span class="tocnumber">1</span> <span class="toctext"><i>Foo</i> <b>Bar</b></span></a></li>
13268 <li class="toclevel-1 tocsection-2"><a href="#Foo_Bar_2"><span class="tocnumber">2</span> <span class="toctext"><i>Foo</i> Bar</span></a></li>
13271 <h2><span class="mw-headline" id="Foo_Bar"><i>Foo</i> <b>Bar</b></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo Bar">edit</a>]</span></h2>
13272 <h2><span class="mw-headline" id="Foo_Bar_2"><i>Foo</i> <blockquote>Bar</blockquote></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a>]</span></h2>
13277 Tags with parameters in TOC
13280 == <sup class="in-h2">Hello</sup> ==
13282 == <sup class="a > b">Evilbye</sup> ==
13284 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
13286 <li class="toclevel-1 tocsection-1"><a href="#Hello"><span class="tocnumber">1</span> <span class="toctext"><sup>Hello</sup></span></a></li>
13287 <li class="toclevel-1 tocsection-2"><a href="#b.22.3EEvilbye"><span class="tocnumber">2</span> <span class="toctext"><sup> b">Evilbye</sup></span></a></li>
13290 <h2><span class="mw-headline" id="Hello"><sup class="in-h2">Hello</sup></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Hello">edit</a>]</span></h2>
13291 <h2><span class="mw-headline" id="b.22.3EEvilbye"><sup> b">Evilbye</sup></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: b">Evilbye">edit</a>]</span></h2>
13296 span tags with directionality in TOC
13299 == <span dir="ltr">C++</span> ==
13301 == <span dir="rtl">זבנג!</span> ==
13303 == <span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span> ==
13305 == <span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span> ==
13307 == <span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span> ==
13309 <table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
13311 <li class="toclevel-1 tocsection-1"><a href="#C.2B.2B"><span class="tocnumber">1</span> <span class="toctext"><span dir="ltr">C++</span></span></a></li>
13312 <li class="toclevel-1 tocsection-2"><a href="#.D7.96.D7.91.D7.A0.D7.92.21"><span class="tocnumber">2</span> <span class="toctext"><span dir="rtl">זבנג!</span></span></a></li>
13313 <li class="toclevel-1 tocsection-3"><a href="#The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">3</span> <span class="toctext"><span>The attributes on these span tags must be deleted from the TOC</span></span></a></li>
13314 <li class="toclevel-1 tocsection-4"><a href="#All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">4</span> <span class="toctext"><span>All attributes on these span tags must be deleted from the TOC</span></span></a></li>
13315 <li class="toclevel-1 tocsection-5"><a href="#Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span class="tocnumber">5</span> <span class="toctext"><span dir="ltr">Attributes after dir on these span tags must be deleted from the TOC</span></span></a></li>
13318 <h2><span class="mw-headline" id="C.2B.2B"><span dir="ltr">C++</span></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: C++">edit</a>]</span></h2>
13319 <h2><span class="mw-headline" id=".D7.96.D7.91.D7.A0.D7.92.21"><span dir="rtl">זבנג!</span></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: זבנג!">edit</a>]</span></h2>
13320 <h2><span class="mw-headline" id="The_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic">The attributes on these span tags must be deleted from the TOC</span></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=3" title="Edit section: The attributes on these span tags must be deleted from the TOC">edit</a>]</span></h2>
13321 <h2><span class="mw-headline" id="All_attributes_on_these_span_tags_must_be_deleted_from_the_TOC"><span style="font-style: italic" dir="ltr">All attributes on these span tags must be deleted from the TOC</span></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=4" title="Edit section: All attributes on these span tags must be deleted from the TOC">edit</a>]</span></h2>
13322 <h2><span class="mw-headline" id="Attributes_after_dir_on_these_span_tags_must_be_deleted_from_the_TOC"><span dir="ltr" style="font-style: italic">Attributes after dir on these span tags must be deleted from the TOC</span></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Attributes after dir on these span tags must be deleted from the TOC">edit</a>]</span></h2>
13329 == {{int:headline_sample}} ==
13333 Bug 32057: Title needed when expanding <h> nodes.
13335 title=[[Main Page]]
13339 <h2><span class="mw-headline" id="Headline_text">Headline text</span> <span class="mw-editsection">[<a href="/index.php?title=Main_Page&action=edit&section=1" title="Edit section: Headline text">edit</a>]</span></h2>
13344 Strip marker in urlencode
13346 {{urlencode:x<nowiki/>y}}
13347 {{urlencode:x<nowiki/>y|wiki}}
13348 {{urlencode:x<nowiki/>y|path}}
13375 Strip marker in formatNum
13377 {{formatnum:1<nowiki/>2}}
13378 {{formatnum:1<nowiki/>2|R}}
13386 Check noCommafy in formatNum
13390 {{formatnum:123456.78}}
13391 {{formatnum:123456.78|NOSEP}}
13399 Strip marker in grammar
13403 {{grammar:elative|foo<nowiki/>bar}}
13410 Strip marker in padleft
13412 {{padleft:|2|x<nowiki/>y}}
13419 Strip marker in padright
13421 {{padright:|2|x<nowiki/>y}}
13428 Strip marker in anchorencode
13430 {{anchorencode:x<nowiki/>y}}
13437 nowiki inside link inside heading (bug 18295)
13439 ==[[foo|x<nowiki>y</nowiki>z]]==
13441 <h2><span class="mw-headline" id="xyz"><a href="/index.php?title=Foo&action=edit&redlink=1" class="new" title="Foo (page does not exist)">xyz</a></span> <span class="mw-editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: xyz">edit</a>]</span></h2>
13446 new support for bdi element (bug 31817)
13448 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
13450 <p dir="rtl" lang="he">ולדימיר לנין (ברוסית: <bdi lang="ru">Владимир Ленин</bdi>, 24 באפריל 1870–22 בינואר 1924) הוא מנהיג פוליטי קומוניסטי רוסי.</p>
13455 Ignore pipe between table row attributes
13459 |- id=foo | style='color: red'
13467 <tr id="foo" style="color: red">
13474 Gallery override link with WikiLink (bug 34852)
13477 File:foobar.jpg|caption|alt=galleryalt|link=InterWikiLink
13480 <ul class="gallery">
13481 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13482 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/InterWikiLink"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
13483 <div class="gallerytext">
13493 Gallery override link with absolute external link (bug 34852)
13496 File:foobar.jpg|caption|alt=galleryalt|link=http://www.example.org
13499 <ul class="gallery">
13500 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13501 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="http://www.example.org"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
13502 <div class="gallerytext">
13512 Gallery override link with malicious javascript (bug 34852)
13515 File:foobar.jpg|caption|alt=galleryalt|link=" onclick="alert('malicious javascript code!');
13518 <ul class="gallery">
13519 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13520 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/%22_onclick%3D%22alert(%27malicious_javascript_code!%27);"><img alt="galleryalt" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
13521 <div class="gallerytext">
13531 Gallery with invalid title as link (bug 43964)
13534 File:foobar.jpg|link=<
13537 <ul class="gallery">
13538 <li class="gallerybox" style="width: 155px"><div style="width: 155px">
13539 <div class="thumb" style="width: 150px;"><div style="margin:68px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg" width="120" height="14" /></a></div></div>
13540 <div class="gallerytext">
13548 Language parser function
13557 Padleft and padright as substr
13559 {{padleft:|3|abcde}}
13560 {{padright:|3|abcde}}
13568 Bug 34939 - Case insensitive link parsing ([HttP://])
13570 [HttP://MediaWiki.Org/]
13572 <p><a rel="nofollow" class="external autonumber" href="HttP://MediaWiki.Org/">[1]</a>
13577 Bug 34939 - Case insensitive link parsing ([HttP:// title])
13579 [HttP://MediaWiki.Org/ MediaWiki]
13581 <p><a rel="nofollow" class="external text" href="HttP://MediaWiki.Org/">MediaWiki</a>
13586 Bug 34939 - Case insensitive link parsing (HttP://)
13588 HttP://MediaWiki.Org/
13590 <p><a rel="nofollow" class="external free" href="HttP://MediaWiki.Org/">HttP://MediaWiki.Org/</a>
13595 ### Parsoids-specific tests
13596 ### Parsoid-PHP parser incompatibilities
13599 1. SOL-sensitive wikitext tokens as template-args
13613 #### The following section of tests are primarily to test
13614 #### wikitext escaping capabilities of Parsoid. Given that
13615 #### escaping can be done any number of ways, the wikitext (input)
13616 #### is always adjusted to reflect how Parsoid adds nowiki
13619 #### We are marking several tests as parsoid-only since the
13620 #### HTML in the result section is different from what the
13621 #### PHP parser generates for it.
13624 #### --------------- Headings ---------------
13626 #### 1. Nested inside html <h1>=foo=</h1>
13627 #### 2. Outside heading nest on a single line <h1>foo</h1>*bar
13628 #### 3. Nested inside html with wikitext split by html tags
13629 #### 4. No escape needed
13630 #### 5. Empty headings <h1></h1>
13631 #### 6. Heading chars in SOL context
13632 #### ----------------------------------------
13634 Headings: 0. Unnested
13638 <nowiki>=foo=</nowiki>
13640 <nowiki> =foo= </nowiki>
13642 <nowiki>=foo=</nowiki>
13644 =foo''a''<nowiki>=</nowiki>
13648 </p><p><!--cmt-->=foo=
13649 </p><p>=foo<i>a</i>=
13654 Headings: 1. Nested inside html
13658 =<nowiki>=foo=</nowiki>=
13659 ==<nowiki>=foo=</nowiki>==
13660 ===<nowiki>=foo=</nowiki>===
13661 ====<nowiki>=foo=</nowiki>====
13662 =====<nowiki>=foo=</nowiki>=====
13663 ======<nowiki>=foo=</nowiki>======
13674 Headings: 2. Outside heading nest on a single line <h1>foo</h1>*bar
13679 <nowiki>*bar</nowiki>
13683 <nowiki>=bar=</nowiki>
13691 Headings: 3. Nested inside html with wikitext split by html tags
13695 =='''bold'''<nowiki>foo=</nowiki>=
13697 <h1>=<b>bold</b>foo=</h1>
13701 Headings: 4a. No escaping needed (testing just h1 and h2)
13712 =<nowiki>=</nowiki>=
13720 <h1><i>=</i>foo=</h1>
13726 Headings: 4b. No escaping needed (inside p-tags)
13741 Headings: 5. Empty headings
13749 =====<nowiki/>=====
13750 ======<nowiki/>======
13761 Headings: 6. Heading chars in SOL context
13765 <!--cmt--><nowiki>=h1=</nowiki>
13766 <!--cmt--><nowiki> =h1= </nowiki>
13773 #### --------------- Lists ---------------
13774 #### 0. Outside nests (*foo, etc.)
13775 #### 1. Nested inside html <ul><li>*foo</li></ul>
13776 #### 2. Inside definition lists
13777 #### 3. Only bullets at start should be escaped
13778 #### 4. No escapes needed
13779 #### 5. No unnecessary escapes
13780 #### 6. Escape bullets in SOL position
13781 #### 7. Escape bullets in a multi-line context
13782 #### ----------------------------------------
13785 Lists: 0. Outside nests
13787 <nowiki>*foo</nowiki>
13789 <nowiki>#foo</nowiki>
13797 Lists: 1. Nested inside html
13799 *<nowiki>*foo</nowiki>
13801 *<nowiki>#foo</nowiki>
13803 *<nowiki>:foo</nowiki>
13805 *<nowiki>;foo</nowiki>
13807 #<nowiki>*foo</nowiki>
13809 #<nowiki>#foo</nowiki>
13811 #<nowiki>:foo</nowiki>
13813 #<nowiki>;foo</nowiki>
13835 Lists: 2. Inside definition lists
13837 ;<nowiki>;foo</nowiki>
13839 ;<nowiki>:foo</nowiki>
13841 ;<nowiki>:foo</nowiki>
13844 :<nowiki>:foo</nowiki>
13859 Lists: 3. Only bullets at start of text should be escaped
13861 *<nowiki>*foo*bar</nowiki>
13863 *<nowiki>*foo</nowiki>''it''*bar
13867 <ul><li>*foo<i>it</i>*bar
13873 Lists: 4. No escapes needed
13885 <ul><li><i>foo</i>*bar
13887 <ul><li><a href="Foo" rel="mw:WikiLink">Foo</a>: bar
13892 Lists: 5. No unnecessary escapes
13894 * bar <span><nowiki>[[foo]]</nowiki></span>
13896 *=bar <span><nowiki>[[foo]]</nowiki></span>
13898 *[[bar <span><nowiki>[[foo]]</nowiki></span>
13900 *]]bar <span><nowiki>[[foo]]</nowiki></span>
13902 *=bar <span>foo]]</span>=
13906 <ul><li> bar <span>[[foo]]</span>
13908 <ul><li>=bar <span>[[foo]]</span>
13910 <ul><li>[[bar <span>[[foo]]</span>
13912 <ul><li>]]bar <span>[[foo]]</span>
13914 <ul><li>=bar <span>foo]]</span>=
13916 <ul><li> <s></s>: a
13922 Lists: 6. Escape bullets in SOL position
13926 <!--cmt--><nowiki>*foo</nowiki>
13933 Lists: 7. Escape bullets in a multi-line context
13943 #### --------------- HRs ---------------
13944 #### 1. Single line
13945 #### -----------------------------------
13948 HRs: 1. Single line
13952 ----<nowiki>----</nowiki>
13961 #### --------------- Tables ---------------
13962 #### 1a. Simple example
13963 #### 1b. No escaping needed (!foo)
13964 #### 1c. No escaping needed (|foo)
13965 #### 1d. No escaping needed (|}foo)
13967 #### 2a. Nested in td (<td>foo|bar</td>)
13968 #### 2b. Nested in td (<td>foo||bar</td>)
13969 #### 2c. Nested in td -- no escaping needed(<td>foo!!bar</td>)
13971 #### 3a. Nested in th (<th>foo!bar</th>)
13972 #### 3b. Nested in th (<th>foo!!bar</th>)
13973 #### 3c. Nested in th -- no escaping needed(<th>foo||bar</th>)
13977 #### 4c. No escaping needed
13978 #### --------------------------------------
13981 Tables: 1a. Simple example
13992 Tables: 1b. No escaping needed
14001 Tables: 1c. No escaping needed
14010 Tables: 1d. No escaping needed
14019 Tables: 2a. Nested in td
14024 |<nowiki>foo|bar</nowiki>
14034 Tables: 2b. Nested in td
14039 |<nowiki>foo||bar</nowiki>
14040 |''it''<nowiki>foo||bar</nowiki>
14045 </td><td><i>it</i>foo||bar
14051 Tables: 2c. Nested in td -- no escaping needed
14066 Tables: 3a. Nested in th
14081 Tables: 3b. Nested in th
14086 !<nowiki>foo!!bar</nowiki>
14096 Tables: 3c. Nested in th -- no escaping needed
14101 !<nowiki>foo||bar</nowiki>
14111 Tables: 4a. Escape -
14119 |<nowiki>-bar</nowiki>
14123 <tr><th>-bar</th></tr>
14124 <tr><td>-bar</td></tr>
14129 Tables: 4b. Escape +
14137 |<nowiki>+bar</nowiki>
14141 <tr><th>+bar</th></tr>
14142 <tr><td>+bar</td></tr>
14147 Tables: 4c. No escaping needed
14161 <tr><td>foo-bar</td><td>foo+bar</td></tr>
14162 <tr><td><i>foo</i>-bar</td><td><i>foo</i>+bar</td></tr>
14166 ### SSS FIXME: Disabled right now because accurate html2wt
14167 ### on this snippet requires data-parsoid flags that we've
14168 ### stripped out of these tests. We should scheme how we
14169 ### we want to handle these kind of tests that require
14170 ### data-parsoid flags for accurate html2wt serialization
14173 Tables: 4d. No escaping needed
14191 #### --------------- Links ---------------
14192 #### 1. Quote marks in link text
14193 #### 2. Wikilinks: Escapes needed
14194 #### 3. Wikilinks: No escapes needed
14195 #### 4. Extlinks: Escapes needed
14196 #### 5. Extlinks: No escapes needed
14197 #### --------------------------------------
14199 Links 1. Quote marks in link text
14203 [[Foo|<nowiki>Foo''boo''</nowiki>]]
14205 <a rel="mw:WikiLink" href="Foo">Foo''boo''</a>
14209 Links 2. WikiLinks: Escapes needed
14213 [[Foo|<nowiki>[Foobar]</nowiki>]]
14214 [[Foo|<nowiki>Foobar]</nowiki>]]
14215 [[Foo|x [Foobar] x]]
14216 [[Foo|<nowiki>x [http://google.com g] x</nowiki>]]
14217 [[Foo|<nowiki>[[Bar]]</nowiki>]]
14218 [[Foo|<nowiki>x [[Bar]] x</nowiki>]]
14219 [[Foo|<nowiki>|Bar</nowiki>]]
14220 [[Foo|<nowiki>]]bar</nowiki>]]
14221 [[Foo|<nowiki>[[bar</nowiki>]]
14222 [[Foo|<nowiki>x ]] y [[ z</nowiki>]]
14224 <a href="Foo" rel="mw:WikiLink">[Foobar]</a>
14225 <a href="Foo" rel="mw:WikiLink">Foobar]</a>
14226 <a href="Foo" rel="mw:WikiLink">x [Foobar] x</a>
14227 <a href="Foo" rel="mw:WikiLink">x [http://google.com g] x</a>
14228 <a href="Foo" rel="mw:WikiLink">[[Bar]]</a>
14229 <a href="Foo" rel="mw:WikiLink">x [[Bar]] x</a>
14230 <a href="Foo" rel="mw:WikiLink">|Bar</a>
14231 <a href="Foo" rel="mw:WikiLink">]]bar</a>
14232 <a href="Foo" rel="mw:WikiLink">[[bar</a>
14233 <a href="Foo" rel="mw:WikiLink">x ]] y [[ z</a>
14237 Links 3. WikiLinks: No escapes needed
14244 <a href="Foo" rel="mw:WikiLink">[Foobar</a>
14245 <a href="Foo" rel="mw:WikiLink">foo|bar</a>
14249 Links 4. ExtLinks: Escapes needed
14253 [http://google.com <nowiki>[google]</nowiki>]
14254 [http://google.com <nowiki>google]</nowiki>]
14256 <a href="http://google.com" rel="mw:ExtLink">[google]</a>
14257 <a href="http://google.com" rel="mw:ExtLink">google]</a>
14261 Links 5. ExtLinks: No escapes needed
14265 [http://google.com [google]
14267 <a href="http://google.com" rel="mw:ExtLink">[google</a>
14270 #### --------------- Quotes ---------------
14271 #### 1. Quotes inside <b> and <i>
14272 #### 2. Link fragments separated by <i> and <b> tags
14273 #### 3. Link fragments inside <i> and <b>
14274 #### --------------------------------------
14276 1. Quotes inside <b> and <i>
14278 ''<nowiki>'foo'</nowiki>''
14279 ''<nowiki>''foo''</nowiki>''
14280 ''<nowiki>'''foo'''</nowiki>''
14281 '''<nowiki>'foo'</nowiki>'''
14282 '''<nowiki>''foo''</nowiki>'''
14283 '''<nowiki>'''foo'''</nowiki>'''
14284 '''<nowiki>foo'</nowiki>''<nowiki>bar'</nowiki>''baz'''
14292 <b>foo'<i>bar'</i>baz</b>
14297 2. Link fragments separated by <i> and <b> tags
14299 [[''foo''<nowiki>hello]]</nowiki>
14301 [['''foo'''<nowiki>hello]]</nowiki>
14303 <p>[[<i>foo</i>hello]]
14304 </p><p>[[<b>foo</b>hello]]
14309 2. Link fragments inside <i> and <b>
14310 (FIXME: Escaping one or both of [[ and ]] is also acceptable --
14311 this is one of the shortcomings of this format)
14313 ''[[foo''<nowiki>]]</nowiki>
14315 '''[[foo'''<nowiki>]]</nowiki>
14318 </p><p><b>[[foo</b>]]
14322 #### --------------- Paragraphs ---------------
14323 #### 1. No unnecessary escapes
14324 #### --------------------------------------
14327 1. No unnecessary escapes
14329 bar <span><nowiki>[[foo]]</nowiki></span>
14331 =bar <span><nowiki>[[foo]]</nowiki></span>
14333 [[bar <span><nowiki>[[foo]]</nowiki></span>
14335 ]]bar <span><nowiki>[[foo]]</nowiki></span>
14337 =bar <span>foo]]</span><nowiki>=</nowiki>
14339 <p>bar <span>[[foo]]</span>
14340 </p><p>=bar <span>[[foo]]</span>
14341 </p><p>[[bar <span>[[foo]]</span>
14342 </p><p>]]bar <span>[[foo]]</span>
14343 </p><p>=bar <span>foo]]</span>=
14347 #### --------------- PRE ------------------
14348 #### 1. Leading space in SOL context should be escaped
14349 #### --------------------------------------
14351 1. Leading space in SOL context should be escaped
14355 <nowiki> foo</nowiki>
14356 <!--cmt--><nowiki> foo</nowiki>
14363 #### --------------- HTML tags ---------------
14366 #### 3. multi-line html tag
14367 #### --------------------------------------
14373 <a href="http://google.com">google</a>
14375 <a href="http://google.com">google</a>
14381 <nowiki><div>foo</div>
14382 <div style="color:red">foo</div></nowiki>
14384 <p><div>foo</div>
14385 <div style="color:red">foo</div>
14390 3. multi-line html tag
14402 #### --------------- Others ---------------
14406 <nowiki>foo</nowiki>
14408 <p><nowiki>foo</nowiki>
14413 Tag-like HTML structures are passed through as text
14435 </p><p>1<d e>f
14440 # This fails in the PHP parser (see bug 40670,
14441 # https://bugzilla.wikimedia.org/show_bug.cgi?id=40670), so disabled for it.
14443 Tag names followed by punctuation should not be recognized as tags
14449 <p><s.ome> text
14454 HTML tag with necessary entities in attributes
14456 <span title="&amp;">foo</span>
14458 <p><span title="&amp;">foo</span>
14463 HTML tag with 'unnecessary' entity encoding in attributes
14465 <span title="&">foo</span>
14467 <p><span title="&">foo</span>
14472 HTML tag with broken attribute value quoting
14474 <span title="Hello world>Foo</span>
14476 <p><span>Foo</span>
14481 Parsoid-only: HTML tag with broken attribute value quoting
14485 <span title="Hello world>Foo</span>
14487 <p><span title="Hello world">Foo</span>
14492 Table with broken attribute value quoting
14495 | title="Hello world|Foo
14506 Table with broken attribute value quoting on consecutive lines
14509 | title="Hello world|Foo
14510 | style="color:red|Bar
14523 Parsoid-only: Table with broken attribute value quoting on consecutive lines
14528 | title="Hello world|Foo
14529 | style="color:red|Bar
14534 <td title="Hello world">Foo
14535 </td><td style="color: red">Bar
14541 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
14551 Parsoid-only: Don't wrap broken template tags in <nowiki> on wt2wt (Bug 42353)
14561 Accept empty td cell attribute
14564 | align="center" | foo || |
14569 <td align="center"> foo </td>
14576 Non-empty attributes in th-cells
14579 ! Foo !! style="color: red" | Bar
14585 <th style="color: red"> Bar
14591 Accept empty attributes in th-cells
14606 Empty table rows go away
14627 ### Parsoid-centric tests for testing RTing of inter-element separators
14628 ### Edge cases not tested by existing parser tests and specific to
14629 ### Parsoid-specific serialization strategies.
14633 RT-ed inter-element separators should be valid separators
14646 Trailing newlines in a deep dom-subtree that ends a wikitext line should be migrated out
14647 (Parsoid-only since PHP parser relies on Tidy for correct output)
14663 Empty TD followed by TD with tpl-generated attribute
14668 |{{echo|style='color:red'}}|foo
14682 Indented table with an empty td
14701 Empty TR followed by a template-generated TR
14702 (Parsoid-specific since PHP parser doesn't handle this mixed tbl-wikitext)
14708 {{echo|<tr><td>foo</td></tr>}}
14716 <td>foo</td></tr></tbody></table>
14719 ## PHP and parsoid output differ for this, and since this is primarily
14720 ## for testing Parsoid's serializer, marking this Parsoid only
14722 Empty TR followed by mixed-ws-comment line should RT correctly
14736 <td> <!--c--></td></tr>
14738 <td><!--c--> <!--d--></td></tr>
14744 Multi-line image caption generated by templates with/without trailing newlines
14748 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}]]
14749 [[File:foo.jpg|thumb|300px|foo\n{{echo|A}}\n{{echo|B}}\n{{echo|C}}\n\n]]
14751 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Foo.jpg" class="new" title="File:Foo.jpg">File:Foo.jpg</a> <div class="thumbcaption">foo\nA\nB\nC</div></div></div>
14752 <div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/index.php?title=Special:Upload&wpDestFile=Foo.jpg" class="new" title="File:Foo.jpg">File:Foo.jpg</a> <div class="thumbcaption">foo\nA\nB\nC\n\n</div></div></div>
14756 ## PHP emits broken html for this, and since this is primarily
14757 ## a Parsoid serializer test, marking this Parsoid only
14759 Improperly nested inline or quotes tags with whitespace in between
14763 <span> <s>x</span> </s>
14766 <p><span> <s>x</s></span><s> </s>
14767 <b> <i>x</i></b><i> </i></span>
14776 Try for 100% code coverage